clojure - Is there any macro to help make a function with one open argument? -


(map (fn [x] (func 1 2 x)) [0 1 2]) func takes 3 arguments can written (map #(func 1 2 %) [0 1 2]) short. possible make more concise? in ocaml, (func 1 2) function. don't need create new 1 , pass map.

clojure doesn't auto-currying, can't (func 1 2), can use partial:

(map (partial func 1 2) [0 1 2])


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -