some -package:some

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.
some p applies the parser p one or more times and returns a list of the values returned by p.
word = some letter
some p applies the parser p one or more times and returns a list of the values returned by p.
word = some letter
some p applies the parser p one or more times and returns a list of the values returned by p.
word = some letter
Deprecated: Renamed as just.
Deprecated: Renamed as just.
One or more.
some m = (:) <$> m <*> many m
Collect one or more parses. Apply the supplied parser repeatedly on the input stream and push the parse results to a downstream fold. Stops: when the downstream fold stops or the parser fails. Fails: if it stops without producing a single result.
>>> some p f = Parser.manyP p (Parser.takeGE 1 f)

>>> some = Parser.countBetween 1 maxBound
Compare with some.
Choose a value that satisfies the given predicate. This is Hillbert's choice, essentially. Note that if the predicate given is not satisfiable (for instance const sFalse), then the element returned will be arbitrary. The only guarantee is that if there's at least one element that satisfies the predicate, then the returned element will be one of those that do. The returned element is not guaranteed to be unique, least, greatest etc, unless there happens to be exactly one satisfying element.
Build a Some c from some thing that satisfies c.
Same as the usual some except a Format is no Functor, let alone Alternative.
Disjunction monoid built with .||.. Use `property @Some` as an accessor which doesn't leak existential variables. Note: monoid laws are satisfied up to isSuccess unless one is using checkCoverage.
Some e                                   ~  Some e
This module provides Some, a GADT that hides a type parameter.
Wrapper to hide an unknown type-level natural.
Hide the type of the payload a tag. There is a whole library dedicated to this nice little GADT: http://hackage.haskell.org/package/some.