Mochi supports trailing closures from version 0.1.2

Mochi supports trailing closures from version 0.1.2.

Example 1

def rmap(seq, closure):
    map(closure, seq)

result = rmap([1, 2, 3]) ->
    print($1)
    $1 * 2

print(doall(result))
# -> 1
# -> 2
# -> 3
# => pvector([2, 4, 6])

Example 2

def foreach(seq, closure):
    doall(filter(closure, seq))

foreach([1, 2, 3]) (item) ->
    new_item = item * 100
    print(new_item)
# -> 100
# -> 200
# -> 300
# => pvector([])