Liking cljdoc? Tell your friends :D

parseq.combinators

Combinators for parseq.parsers and similar.

Combinators for `parseq.parsers` and similar.
raw docstring

andclj

(and & parsers)

Applies parsers one after another. If any parser fails, it fails.

Applies `parsers` one after another. If any parser fails, it fails.
raw docstring

bindclj

(bind p f)

This is a monadic bind. A.k.a. >>=.

Its type is:

bind :: [Parser a, (a -> Parser b)] -> Parser b

This is a monadic bind. A.k.a. `>>=`.

Its type is:

bind :: [Parser a, (a -> Parser b)] -> Parser b
raw docstring

fmapclj

(fmap f p)

Applies function f to the result of p.

Its type is:

fmap :: [Parser a, (a -> b)] -> Parser b

Applies function `f` to the result of `p`.

Its type is:

fmap :: [Parser a, (a -> b)] -> Parser b
raw docstring

many*clj

(many* p)

Parse p 0 or more times. Similar to * in regular expressions.

Parse `p` 0 or more times. Similar to `*` in regular expressions.
raw docstring

many+clj

(many+ p)

Parse p 1 or more times. Similar to + in regular expressions.

Parse `p` 1 or more times. Similar to `+` in regular expressions.
raw docstring

mergeclj

(merge parsers)

Applies parsers in order and then merges their results into one big fat map.

Applies `parsers` in order and then merges their results into one big fat
map.
raw docstring

one?clj

(one? p)

Optionally parses one p, returning a sequential coll containing it, if found. If p doesn't match, returns an empty coll.

Optionally parses one `p`, returning a sequential coll containing it, if
found. If `p` doesn't match, returns an empty coll.
raw docstring

optionalclj

Alias to one?

Alias to `one?`
raw docstring

orclj

(or & parsers)

Tries parsers one after another. Returns the result from the first parser that succeeds. If all parsers fail, it fails.

Tries `parsers` one after another. Returns the result from the first parser
that succeeds. If all parsers fail, it fails.
raw docstring

peekclj

(peek p)

Peeks with p (and fails if p fails). Does not consume any input.

Peeks with `p` (and fails if `p` fails). Does not consume any input.
raw docstring

returnclj

(return v)

A parser that does nothing and always succeeds. It returns the input unchanged and the supplied v as a result.

A parser that does nothing and always succeeds. It returns the input
unchanged and the supplied `v` as a result.
raw docstring

skip*clj

(skip* p)

Skips 0 or more p.

Skips 0 or more `p`.
raw docstring

skip+clj

(skip+ p)

Skips 1 or more p.

Skips 1 or more `p`.
raw docstring

unordered-pairclj

(unordered-pair p1 p2)

Tries p1 followed by p2 or p2 followed by p1. If either combination succeeds, always returns [result1 result2].

Tries `p1` followed by `p2` or `p2` followed by `p1`. If either combination
succeeds, always returns `[result1 result2]`. 
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close