stream_split would do something like that. The tail is stored in a continuation function, so i'm not sure if this is 'good code', and i'd not vouch for putting something like that in stdlib without a thorough analysis (eg covering issues related to cleaning up the enumerable if the tail is not iterated after)
https://hex.pm/packages/stream_split For simple cases though it works well :) -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/63b9a254-e3f6-41f3-8ba1-18de50d1ac86%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
