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
The documentation for Stream mentions "unfoldM uncons gives the [t] corresponding to the stream", but unfoldM doesn't exist in base or parsec package. I assume the monadification of Data.List's unfoldr is meant if evaluated in the identity monad? Then maybe this would be a better documentation:
unfoldM uncons gives the [t] corresponding to the stream if the result type is the Identity monad and unfoldM is defined as follows:
unfoldM :: Monad m => (a -> m (Maybe (b, a))) -> a -> m [b]
unfoldM f b = do
fb <- f b
case fb of
Just (a, b') -> pure ((:) a) <*> unfoldM f b'
Nothing -> pure []
Or maybe change it to "unfoldr (runIdentity . uncons) gives the [t] corresponding to the stream"?
The text was updated successfully, but these errors were encountered:
The documentation for Stream mentions "unfoldM uncons gives the [t] corresponding to the stream", but unfoldM doesn't exist in base or parsec package. I assume the monadification of Data.List's unfoldr is meant if evaluated in the identity monad? Then maybe this would be a better documentation:
Or maybe change it to "
unfoldr (runIdentity . uncons)
gives the [t] corresponding to the stream"?The text was updated successfully, but these errors were encountered: