X Tutup
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/clj/clojure/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2385,6 +2385,19 @@
([f arg1 arg2 arg3 & more]
(fn [& args] (apply f arg1 arg2 arg3 (concat more args)))))

(defn flip
"Flips the given function arguments."
{:added "1.4"}
[f]
(comp (partial apply f) reverse list))

(defn partial*
"Flips the given function arguments and returns a new function
partially applied to a variable number of arguments."
{:added "1.4"}
[f & args]
(apply partial (flip f) args))

;;;;;;;;;;;;;;;;;;; sequence fns ;;;;;;;;;;;;;;;;;;;;;;;
(defn sequence
"Coerces coll to a (possibly empty) sequence, if it is not already
Expand Down
X Tutup