(extend-all proto ptmpls & args)
Transforms a protocl template into multiple extend-type expresions
(macroexpand-1 '(extend-all Magma [(op ([x y] (% x y)))]
Number [op-number]
[List Vector] [op-list]))
=> '(do (clojure.core/extend-type Number Magma (op ([x y] (op-number x y)))) (clojure.core/extend-type List Magma (op ([x y] (op-list x y)))) (clojure.core/extend-type Vector Magma (op ([x y] (op-list x y)))))
Transforms a protocl template into multiple extend-type expresions (macroexpand-1 '(extend-all Magma [(op ([x y] (% x y)))] Number [op-number] [List Vector] [op-list])) => '(do (clojure.core/extend-type Number Magma (op ([x y] (op-number x y)))) (clojure.core/extend-type List Magma (op ([x y] (op-list x y)))) (clojure.core/extend-type Vector Magma (op ([x y] (op-list x y)))))
(extend-entry proto ptmpls [ts funcs])
Helper function for extend-all
(extend-entry 'Magma '[(op ([x y] (% x y)))] '[Number [op-number]]) => '[(clojure.core/extend-type Number Magma (op ([x y] (op-number x y))))]
Helper function for extend-all (extend-entry 'Magma '[(op ([x y] (% x y)))] '[Number [op-number]]) => '[(clojure.core/extend-type Number Magma (op ([x y] (op-number x y))))]
(extend-single t proto ptmpls funcs)
Transforms a protocol template into an extend-type expression
(extend-single 'Type 'IProtocol '[(op [x y] (% x y))] '[op-object]) => '(clojure.core/extend-type Type IProtocol (op [x y] (op-object x y)))
Transforms a protocol template into an extend-type expression (extend-single 'Type 'IProtocol '[(op [x y] (% x y))] '[op-object]) => '(clojure.core/extend-type Type IProtocol (op [x y] (op-object x y)))
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close