macros, i wish

2 views
Skip to first unread message

Raoul Duke

unread,
Aug 23, 2022, 7:41:08 PM8/23/22
to pi...@googlegroups.com
things like the layers of evaluation get in the way pretty easily and
are darned confusing to me especially w/out types to help. this is
elisp.



(defmacro where (wbody wlets)
`(let ,wlets ,wbody))
where

(where (+ 1 z) ((z 17)))
18

((lambda (x) (+ 1 x)) 2)
3

(where (lambda (x) (+ z x)) ((z 17)))
(lambda (x) (+ z x))

((where (lambda (x) (+ z x)) ((z 17))) 2)
; error

Raoul Duke

unread,
Aug 29, 2022, 7:13:22 PM8/29/22
to pi...@googlegroups.com
re-learned that lisp is lisp2, not scheme lisp1, so even with
non-macro-where lets you would have to use apply anyway.
Reply all
Reply to author
Forward
0 new messages