Proper tail threading

This commit is contained in:
Dane Johnson 2024-10-28 12:41:35 -05:00
parent ef8efcb3e0
commit 8bac998a25

4
d-.scm
View File

@ -17,8 +17,8 @@
(define-syntax ~>>
(syntax-rules ()
[(_ v) v]
[(_ v (fn args ...) more ...) (~> (fn args ... v) more ...)]
[(_ v fn more ...) (~> (fn v) more ...)]))
[(_ v (fn args ...) more ...) (~>> (fn args ... v) more ...)]
[(_ v fn more ...) (~>> (fn v) more ...)]))
(define-syntax-rule (if-not pred body ...)
(if (not pred) body ...))