Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 11cad66cf4
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.551 kb
# arrow expressions are useful for cases when multiple transformations are
# applied to the same variable and temporary variables makes the code ugly
foo = fn (A, B) {
(A, B)
}
foo = fn (A, B, C) {
(A, B, C)
}
bar = fn (A, B, C, D) {
(D, B, C, A)
}
@public
run = fn () {
# this expression is the same as the one below
A = 1->foo(2)->
foo(3,4)->
bar(5, 6, 7)->
foo(8)
# this is the same as the expression above
B = foo(bar(foo(foo(1, 2), 3, 4), 5, 6, 7), 8)
io.format("~p~n~p~n", [A, B])
}
Jump to Line
Something went wrong with that request. Please try again.