Closed bens closed 6 years ago
A Process that passes through elements unwrapped from Just until a Nothing is found, then stops.
Process
Just
Nothing
This can be constructed from a plan with
takingJusts :: Process (Maybe a) a takingJusts = repeatedly $ await >>= maybe stop yield
Examples:
>>> run $ takingJusts <~ source [Just 1, Just 2, Nothing, Just 3, Just 4] [1,2]
Thanks for your work. Could you use a more detailed commit message? For instance, Implement takingJusts?
Implement takingJusts
I've changed the commit message to be a bit more descriptive, thanks @YoEight.
Thanks!
A
Process
that passes through elements unwrapped fromJust
until aNothing
is found, then stops.This can be constructed from a plan with
Examples: