Lift functions into protocols.
Lift functions into protocols.
(lift-as name)
(lift-as name opts)
Lift the functions in the current namespace, which names are prefixed with the - character and takes at least one argument. They are lifted into a protocol with the given name, where the prefix is stripped from the protocol function names. Do not use destructuring in the functions' signatures.
An options map can be supplied. The following options are supported:
:expand-vararg-for #{-my-fn ...}
Expands the vararg of a function into argument lists for up to 20 arguments total.
Lift the functions in the current namespace, which names are prefixed with the - character and takes at least one argument. They are lifted into a protocol with the given name, where the prefix is stripped from the protocol function names. Do not use destructuring in the functions' signatures. An options map can be supplied. The following options are supported: :expand-vararg-for #{-my-fn ...} Expands the vararg of a function into argument lists for up to 20 arguments total.
(lift-on protocol obj)
Lift the functions in the given protocol into a protocol implementation. The protocol implementation calls the prefixed functions, receiving the given obj as its first parameter.
Lift the functions in the given protocol into a protocol implementation. The protocol implementation calls the prefixed functions, receiving the given obj as its first parameter.
(lifted this)
Returns the object that was lifted using lift-on.
Returns the object that was lifted using lift-on.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close