Liking cljdoc? Tell your friends :D

fogus.evalive

Various eval functions and macros.

Various eval functions and macros.
raw docstring

*maximum-evil*clj

This defines if macros should provide maximum access.

This defines if macros should provide maximum access.
raw docstring

destrocljmacro

(destro binds form)

Provides a simple way to obtain a map of the lexical context based on the result of a destructuring operation. That is, the typical call to the destructure function will operate along the lines of:

(destructure '[[_ _ x _ _] [1 2 3 4 5]])

;=> [V [1 2 3 4 5] _ (nth V 0 nil) _ (nth V 1 nil) x (nth V 2 nil) _ (nth V 3 nil) _ (nth V 4 nil)]

whereby the form returned contains the operations needed to pull apart (i.e. destructure) the data structure under examination. However, destro will instead resolve the values of the destructuring operation, including any intermediate bindings, as below:

(destro [a b [c d & e] :as Z] [1 2 [3 4 5 6 7 8]])

;=> {vec__2330 [1 2 [3 4 5 6 7 8]], a 1, b 2, vec__2331 [3 4 5 6 7 8], c 3, d 4, e (5 6 7 8), Z [1 2 [3 4 5 6 7 8]]}

This will also operate as expected within a lexical context:

(let [c [1 2]] (destro [a b] c))

;=> {c [1 2], vec__2336 [1 2], a 1, b 2}

Provides a simple way to obtain a map of the lexical context based on the
result of a destructuring operation.  That is, the typical call to the
`destructure` function will operate along the lines of:

 (destructure '[[_ _ x _ _] [1 2 3 4 5]])
 
 ;=> [V [1 2 3 4 5]
      _ (nth V 0 nil)
      _ (nth V 1 nil)
      x (nth V 2 nil)
      _ (nth V 3 nil)
      _ (nth V 4 nil)]

whereby the form returned contains the operations needed to pull apart (i.e. destructure)
the data structure under examination.  However, `destro` will instead resolve the values
of the destructuring operation, including any intermediate bindings, as below:

 (destro [a b [c d & e] :as Z]
         [1 2 [3 4 5 6 7 8]])

 ;=> {vec__2330 [1 2 [3 4 5 6 7 8]],
      a 1,
      b 2,
      vec__2331 [3 4 5 6 7 8],
      c 3,
      d 4,
      e (5 6 7 8),
      Z [1 2 [3 4 5 6 7 8]]}

This will also operate as expected within a lexical context:

 (let [c [1 2]]
   (destro [a b] c))

 ;=> {c [1 2],
      vec__2336 [1 2],
      a 1,
      b 2}
raw docstring

Evilcljprotocol

Defines the public interface to evilive's "contextual eval"® facilities. In a nutshell, contextual eval refers to perform an eval that refers to lexical bindings in addition to namespace bindings. You see, the core eval function, like and function, is not privy to the lexical context in which it is run and is therefore of limited scope in its usefulness. However, evalive enhances the stock eval by building a lexical context into the form under evaluation from various structures.

Defines the public interface to evilive's "contextual eval"® facilities.  In a nutshell,
contextual eval refers to perform an eval that refers to lexical bindings in addition to namespace
bindings.  You see, the core `eval` function, like and function, is not privy to the lexical context
in which it is run and is therefore of limited scope in its usefulness.  However, evalive enhances
the stock `eval` by building a lexical context into the form under evaluation from various structures.

evilclj

(evil this form)
raw docstring

wtfncljmacro

(wtfn macro-name)

Takes a macro name and returns a function that invokes the macro as if it were a function.

Takes a macro name and returns a function that
invokes the macro as if it were a function.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close