(mac w/ (val . forms) ((afn (x f) (if (null? f) x (self `(let _ ,x ,@(car f)) (cdr f)))) val forms))
(w/ '() (cons 10 _) (cons 20 _) (cons 30 _) (map [(* _ 2)] _) (list (length _) _))
(3 (20 40 60))
(mac w/ (val . forms) ((afn (x f) (if (no f) x (self `(let _ ,x ,(car f)) (cdr f)))) val forms))
-----
It could be adapted for other monads if it also took return and (>>=) as arguments.
(mac w/ (monad x . rest) (w/uniq (gmonad) ((afn (x rest) (if (no rest) `(let ,gmonad ,monad ,x) (self `((car ,gmonad) (fn (_) ,(car rest)) ,x) (cdr rest)))) `((cdr ,gmonad) ,x)))) (= list-ret list) (= list-bind mappend) (= list-monad (cons list-bind list-ret)) (w/ list-monad 10 (list (- _ 1) _ (+ _ 1)) (list _ (* _ 2) (* _ 3))) ===> (9 18 27 10 20 30 11 22 33)