3 ms·
Coconut is a compile-to-python(2/3) language, not just a library, so if you use it you have to be OK with using a transpiler in your project. Here's one way yo
by brightsize 9y ago
Coconut is a compile-to-python(2/3) language, not just a library, so if you use it you have to be OK with using a transpiler in your project.
Here's one way you might write one of the examples in Coconut:
([1, 2, 3, 4]
|> map$(-> _ * 2)
|> filter$(-> _ > 4)
|> reduce$((x, y) -> x + y)
)
You may freely mix Coconut and Python in a project, even in the same file, but any Coconut code still needs to be run through the compiler.