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) (where fn is 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.
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)
(wherefn
is known to be a function with more than one parameter) should be equivalent to(partial fn (math/const 42) 0)
(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.