Hacker News new | ask | show | jobs
by ajanuary 1018 days ago
It’s been a while since I did any C#. How do I write a function that returns something that encapsulates the operations to perform on the stream that I can then compose with other operations? And can I then apply to whatever sequence abstraction I have? Isn’t it limited to things that implement IEnumerable? I seem to remember when transducers were introduced, one of the selling points was it wasn’t fixed to a specific sequence abstraction.
1 comments

In fairness, it’s hard to picture a scenario where you couldn’t have an IEnumerable wherever you might want one.