summaryrefslogtreecommitdiff
path: root/tests/examplefiles/example_elixir.ex
diff options
context:
space:
mode:
authorAlexei Sholik <alcosholik@gmail.com>2014-09-10 20:32:40 +0300
committerAlexei Sholik <alcosholik@gmail.com>2014-09-10 20:32:40 +0300
commita5e8f686cea05a44f62423cfdb5c628f452bb55a (patch)
tree241e2a71b204b1d04c95159fb86218d1d37ff516 /tests/examplefiles/example_elixir.ex
parent04e47f0f5ebd530eb9bc4380848d31279f01fb0b (diff)
downloadpygments-a5e8f686cea05a44f62423cfdb5c628f452bb55a.tar.gz
[Elixir] Add the last batch of new operators introduced just before the 1.0.0 release.
Diffstat (limited to 'tests/examplefiles/example_elixir.ex')
-rw-r--r--tests/examplefiles/example_elixir.ex8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/examplefiles/example_elixir.ex b/tests/examplefiles/example_elixir.ex
index 27462268..ddca7f60 100644
--- a/tests/examplefiles/example_elixir.ex
+++ b/tests/examplefiles/example_elixir.ex
@@ -66,6 +66,14 @@ y = true and false; z = false or true
"hello" |> String.upcase |> String.downcase()
{^z, a} = {true, x}
+# Free operators (added in 1.0.0)
+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)
+p1 <|> p2 = either(p1, p2)
+
# Lists, tuples, maps, keywords
[1, :a, 'hello'] ++ [2, 3]
[:head | [?t, ?a, ?i, ?l]]