|
|
|
|
|
by Scriptor
4640 days ago
|
|
It works (superficially) similarly to how Haskell does things and treats (+) as a partial function call by recognizing that + isn't getting at least 2 arguments. You could also do stuff like: ((+ 1) 2) ; => 3
(map (* 2) [1 2 3]) ; => [2 4 6]
If a function f takes any arguments and Pharen knows this, it'll convert (f) into a partial function call as well. Unfortunately I haven't figured out a way to check if a function has any side effects. Otherwise in this case at least operators are treated like functions. |
|
I suppose that comes at the cost of (+ 1 2 3 4)?