Skip to main content

operators.mylang (Source)

let array = [ 13 11 7 5 3 2 ]
array.[ 1 .. 3 ]        # [ 13 11 7 ]
array.[ 1 .. ]          # [ 13 11 7 5 3 2 ]
array.[ .. 3 ]          # [ 13 11 7 ]
array.[ .. ]            # [ 13 11 7 5 3 2 ]
# TODO: for .. do
1 + 2                   # 3
(+) 1 2 3               # 6
1 - 2                   # -1