Liking cljdoc? Tell your friends :D
Clojure only.

hara.function.dispatch


callclj

(call f)
(call f v)
(call f v1 v2)
(call f v1 v2 v3)
(call f v1 v2 v3 v4)
(call f v1 v2 v3 v4 & vs)

Executes (f v1 ... vn) if f is not nil

(call nil 1 2 3) => nil

(call + 1 2 3) => 6

Executes `(f v1 ... vn)` if `f` is not nil

(call nil 1 2 3) => nil

(call + 1 2 3) => 6
raw docstring

msgclj

(msg obj kw)
(msg obj kw v)
(msg obj kw v1 v2)
(msg obj kw v1 v2 v3)
(msg obj kw v1 v2 v3 v4)
(msg obj kw v1 v2 v3 v4 & vs)

Message dispatch for object orientated type calling convention.

(def obj {:a 10 :b 20 :get-sum (fn [this] (+ (:b this) (:a this)))})

(msg obj :get-sum) => 30

Message dispatch for object orientated type calling convention.

(def obj {:a 10
          :b 20
          :get-sum (fn [this]
                    (+ (:b this) (:a this)))})

(msg obj :get-sum) => 30
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close