Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
This doesn't directly answer your question, but consider taking a look at https://github.com/odis-labs/streaming that implements both pull and push streams.
Re Haskell Foldl: do you mean it doesn't support finite streams? Because the limitation of Foldl is precisely the fact that it is strict and doesn't support early termination. See https://github.com/Gabriella439/foldl/issues/85
Here is what I have currently. I use Standard ML instead of OCaml, though the code is extremely similar. The main differences are that SML prefers uncurried functions and doesn't have universal quantification.