some package:fused-effects

One or more.
some m = (:) <$> m <*> many m
One or more.

Examples

>>> some (putStr "la")
lalalalalalalalala... * goes on forever *
>>> some Nothing
nothing
>>> take 5 <$> some (Just 1)
* hangs forever *
Note that this function can be used with Parsers based on Applicatives. In that case some parser will attempt to parse parser one or more times until it fails.
One or more, returning a NonEmpty list of the results.
some1 m = (:|) <$> m <*> many m