(fact-let-declare m)creates let declarations
(fact-let-declare '{:let [a 1 b 2 c 3] :use [serv]}) => '[(def a nil) (def b nil) (def c nil) (def serv nil)]
creates let declarations
(fact-let-declare '{:let [a 1 b 2 c 3]
:use [*serv*]})
=> '[(def a nil) (def b nil) (def c nil) (def *serv* nil)](fact-let-defs m)create def forms for symbols
(fact-let-defs '{:let [a 1 b 2]}) => '[(def a 1) (def b 2)]
create def forms for symbols
(fact-let-defs '{:let [a 1 b 2]})
=> '[(def a 1) (def b 2)](fact-slim bare)creates the slim thunk
(fact-slim '[(+ a b)])
creates the slim thunk (fact-slim '[(+ a b)])
(fact-use vsym ks)setup form for use (with component)
setup form for use (with component)
(fact-use-setup vsym)setup form for 'use'
(fact-use-setup 'serv) => '(start (list :database))
setup form for 'use' (fact-use-setup '*serv*) => '(start (list :database))
(fact-use-setup-eval vsym)setup form form eval
(fact-use-setup-eval 'serv) => '(list :database)
setup form form eval (fact-use-setup-eval '*serv*) => '(list :database)
(fact-use-teardown vsym)teardown form for 'use'
(fact-use-teardown 'serv) => '(clojure.core/identity serv)
teardown form for 'use' (fact-use-teardown '*serv*) => '(clojure.core/identity *serv*)
(fact-wrap-bindings m)creates a wrapper for bindings
(fact-wrap-bindings '{:let [a 1 b (+ a 1)]})
creates a wrapper for bindings
(fact-wrap-bindings '{:let [a 1 b (+ a 1)]})(fact-wrap-ceremony {:keys [setup teardown guard] :as m})creates the setup/teardown wrapper
(fact-wrap-ceremony '{:setup [(prn 1 2 3)] :teardown (prn "goodbye")})
creates the setup/teardown wrapper
(fact-wrap-ceremony '{:setup [(prn 1 2 3)]
:teardown (prn "goodbye")})(fact-wrap-check {:keys [check guard] :as m})creates a wrapper for before and after arrows
creates a wrapper for before and after arrows
(fact-wrap-replace m)creates a replace wrapper
(fact-wrap-replace '{:use [serv] :let [a 1 b 2] :replace {+ -}})
creates a replace wrapper
(fact-wrap-replace '{:use [*serv*]
:let [a 1 b 2]
:replace {+ -}})(replace-bindings old new)replaces values of current bindings
(replace-bindings '[a 1 b 2 c 3] '[b 4]) => '[a 1 b 4 c 3]
replaces values of current bindings
(replace-bindings '[a 1 b 2 c 3]
'[b 4])
=> '[a 1 b 4 c 3](vecify obj)puts the item in a vector if not already
(vecify 1) => [1]
puts the item in a vector if not already (vecify 1) => [1]
(wrap-bindings form bindings)wraps the form in bindings
(wrap-bindings '(+ a b) '[a 1 b (+ a 1)]) => '(clojure.core/binding [a 1] (clojure.core/binding [b (+ a 1)] (+ a b)))
wraps the form in bindings
(wrap-bindings '(+ a b)
'[a 1 b (+ a 1)])
=> '(clojure.core/binding [a 1]
(clojure.core/binding [b (+ a 1)]
(+ a b)))cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |