Coconut
Trying coconut!
"hello, world!" |> print
hello, world!
def binexp(x) = 2**x
5 |> binexp |> print
32
def last_two(_ + [a, b]):
return a, b
def xydict_to_xytuple({"x":x is int, "y":y is int}):
return x, y
range(5) |> last_two |> print
{"x":1, "y":2} |> xydict_to_xytuple |> print
(3, 4)
(1, 2)
x = range(100)
square = (-> _*_)