Skip to content

Instantly share code, notes, and snippets.

View shayelkin's full-sized avatar

Shay Elkin shayelkin

View GitHub Profile
@shayelkin
shayelkin / threading.lisp
Created January 19, 2024 03:21
A lisp implementation of Clojure's threading macro
(defmacro -> (form &rest forms)
(reduce
(lambda (acc next)
(if (listp next)
(list* (car next) acc (cdr next))
(list next acc)))
forms
:initial-value form))