-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
It would be cool if there was some more syntactic sugar for partial function definitions.
(fn _ 42)should be equivalent to(partial fn (math/const 42) 1)(fn 42)(wherefnis known to be a function with more than one parameter) should be equivalent to(partial fn (math/const 42) 0)- The above should also work with non-lambda functions, i.e.
(math/add 1)should be equivalent to(defco bindAdd [param] (partial (fn [x y] (+ x y)) param 0)) (bindAdd 1). Note that the optimizer will be able to remove these cases, so there would be no performance penality at all.