Yuescript
Yuescript copied to clipboard
Operators as functions, and partial application of operators
LiveScript (a descendant of CoffeeScript that also supports features like pipes and spread operators) supports operators as functions, with partial application.
This allows for Polish-like notation:
(in [1 to 3]) 2 # true
It also combines well with pipes:
111 |> (+) 222 # 333
I'd love to see this in Yuescript.
(LiveScript's biop are just Haskell's operator sections)
The in operator is useful to make many comparing expressions simpler, but I'm not getting the use for operator function with partial application, it won't be hard to write functions to generate currying functions, why this should be a builtin feature.