4 ms·
I just put out a new release of TXR, which has a change that can reduce the nesting. In pipes, you can now bind variables that are in scope of later pipeline e
by kazinator 3y ago
I just put out a new release of TXR, which has a change that can reduce the nesting.
In pipes, you can now bind variables that are in scope of later pipeline elements.
1> (flow "/usr/share/dict/words" ; start with this path
(file-get-lines) ; get content as list of lines
(let lines) ; bind lines variable to this list
len ; take length of list
rand ; get pseudo-random in [0, length)
lines) ; index into lines
"subdues"
- manicennui 3y agoClojure has several threading macros: https://clojure.org/guides/threading_macros https://clojure.org/guides/threading_macros
- pfdietz 3y agoThese can all be defined in CL and have been. https://quickref.common-lisp.net/arrows.html https://quickref.common-lisp.net/arrows.html