elixir-lang/elixir — pull request #2702 by alexrp (2014-08-21 01:10:20+00:00)
Title: Introduce new operators intended for use by parser combinator libraries.

The expected definitions (which are by no means required) in
parser combinator speak are:

* `p ~>> f` = `bind(p, f)`
* `p1 ~> p2` = `pair_right(p1, p2)`
* `p1 <~ p2` = `pair_left(p1, p2)`
* `p1 <~> p2` = `pair_both(p1, p2)`
* `p |~> f` = `map(p, f)`
* `1p <|> p2` = `either(p1, p2)`

Example usage in ExParsec: https://gist.github.com/alexrp/937b3da51f22f90c4e90