Extensible let to allow efficient typed destructuring. Two extensions are registered - dlbs and lngs which do an efficient typed nth operation resulting in primitive longs and doubles respectively.
dlbs and lngs will most efficiently destructure java primitive arrays and fall back to casting the result of clojure.lang.RT/nth if input is not a double or long array.
This can significantly reduce boxing in tight loops without needing to result in really verbose pathways.
user> (hlet [[a b] (dbls [1 2])] (+ a b))
3.0
See also ham-fisted.primitive-invoke
, ham-fisted.api/dnth
ham-fisted.api/lnth
.
Extensible let to allow efficient typed destructuring. Two extensions are registered - dlbs and lngs which do an efficient typed nth operation resulting in primitive longs and doubles respectively. dlbs and lngs will most efficiently destructure java primitive arrays and fall back to casting the result of clojure.lang.RT/nth if input is not a double or long array. This can significantly reduce boxing in tight loops without needing to result in really verbose pathways. ```clojure user> (hlet [[a b] (dbls [1 2])] (+ a b)) 3.0 ``` See also [[ham-fisted.primitive-invoke]], [[ham-fisted.api/dnth]] [[ham-fisted.api/lnth]].
(extend-let sym-name code)
Code must take two arguments, left and right hand sides and return a flattened sequence of left and right hand sides. This uses a special symbol that will look like a function call on the right hand side.
See source code of this file for example extensions.
Code must take two arguments, left and right hand sides and return a flattened sequence of left and right hand sides. This uses a special symbol that will look like a function call on the right hand side. See source code of this file for example extensions.
(let bindings & body)
Extensible let intended to allow typed destructuring of arbitrary datatypes such as primitive vectors or point types. Falls back to normal let after extension process.
Extensible let intended to allow typed destructuring of arbitrary datatypes such as primitive vectors or point types. Falls back to normal let after extension process.
(let-extension-names)
Return the current extension names.
Return the current extension names.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close