(side-effect! f)
(side-effect! ctxt f)
Mark a function as side effect either for use with [[fr.jeremyschoffen.mapiform.core/thread-fns]] (arity 1) or [[clojure.core/->]] (arity 2).
examples:
((side-effect! println) 1)
;1
;=> 1
(-> 1
inc ; 2
(thread-fns dec ;1
(side-effect! println)
inc) ;2
(side-effect! println)
dec);1
;1
;2
;=> 1
Mark a function as side effect either for use with [[fr.jeremyschoffen.mapiform.core/thread-fns]] (arity 1) or [[clojure.core/->]] (arity 2). examples: ```clojure ((side-effect! println) 1) ;1 ;=> 1 (-> 1 inc ; 2 (thread-fns dec ;1 (side-effect! println) inc) ;2 (side-effect! println) dec);1 ;1 ;2 ;=> 1 ```
(thread-fns v & fns)
Function serving a similar purpose than the ->
macro. It will thread a value v
through a sequence of
functions fns
the result of one function application becoming the argument of the next.
Args:
v
: the value to be threadedfns
: 1 argument functions that will be applied.Function serving a similar purpose than the `->` macro. It will thread a value `v` through a sequence of functions `fns` the result of one function application becoming the argument of the next. Args: - `v`: the value to be threaded - `fns`: 1 argument functions that will be applied.
(wrapped-side-effect! f wrapper)
(wrapped-side-effect! ctxt f wrapper)
Similar to [[fr.jeremyschoffen.mapiform.core/side-effect!]] with the added functionnality
of wrapping the function f
with the middleware wrapper
.
Similar to [[fr.jeremyschoffen.mapiform.core/side-effect!]] with the added functionnality of wrapping the function `f` with the middleware `wrapper`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close