3 ms·
He can have what he wants in the compile-to-python (2/3) language Coconut[1]. I'm using it and it's a joy. >>> def f1(x) = x * 2 >>> def f2(x) = x * 3 >
by brightsize 10y ago
He can have what he wants in the compile-to-python (2/3) language Coconut[1]. I'm using it and it's a joy.
>>> def f1(x) = x * 2
>>> def f2(x) = x * 3
>>> newfunc = f1..f2
>>> newfunc(1)
6
>>> 2 |> f1 |> f2
12
and
>>> [y for y in [1,2,3] |> map$(f1) |> map$(f2)]
[6,12,18]
[1] http://coconut-lang.org/ http://coconut-lang.org/