Lift functions into protocols.
Lift functions into protocols.
(lift-as name)
(lift-as name opts)
Lifts the functions in the current namespace into a protocol. Only functions prefixed with the - character and taking at least one argument are lifted. The functions are lifted into a protocol with the given name, where the prefix is stripped from the protocol function names. Does not support destructuring in the functions' signatures.
An options map can be supplied. The following options are supported:
:expand-varargs-for #{-my-fn ...}
Expands the vararg of a function into argument lists for up to 20 arguments total.
Lifts the functions in the current namespace into a protocol. Only functions prefixed with the - character and taking at least one argument are lifted. The functions are lifted into a protocol with the given name, where the prefix is stripped from the protocol function names. Does not support destructuring in the functions' signatures. An options map can be supplied. The following options are supported: :expand-varargs-for #{-my-fn ...} Expands the vararg of a function into argument lists for up to 20 arguments total.
(lift-on protocol obj)
(lift-on protocol obj opts)
Create a protocol implementation for the given protocol. The protocol implementation calls "lifted" functions, passing the given obj as its first parameter.
An options map can be supplied. The following options are supported:
:impl-ns my.impl.mock
Instead of calling the lifted functions in the namespace of the protocol, it will call them in the specified namespace.
Create a protocol implementation for the given protocol. The protocol implementation calls "lifted" functions, passing the given obj as its first parameter. An options map can be supplied. The following options are supported: :impl-ns my.impl.mock Instead of calling the lifted functions in the namespace of the protocol, it will call them in the specified namespace.
(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