You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going through State + replicateM is slow, unless maybe if we specialize it as well like it is done for ST and IO when doing unstreaming.
One fallback always is to use mutable interface instead, but that means no fusion.
So, this function is incredibly useful, as you probably saw in haskell/random#133 so I am definitely all for adding unfoldr that returns the last value. Any volunteers?
This is very tricky function to write inside stream fusion framework. b is hidden inside existential state of stream and we don't have any way to access it:
I have a job for
but it is surprisingly difficult to emulate: the best I managed to do was put
b
intoState
and usereplicateM
.How do you feel about extending
vector
with such function?The text was updated successfully, but these errors were encountered: