VAX LISP is missing DESTRUCTURING-BIND, so I had to implement it:
(defmacro destructuring-bind (spec value &body body)
`(apply #'(lambda ,spec ,@body) ,value))
Took me a bit to figure out that bare lambda without explicit #' won't work except in the function position.
This only implements one layer of destructuring, so it's a bit misleading to call it thus.
-
-
It is sufficient for this purpose, but I am curious to see some examples of what destructuring-bind can do beyond simple lambda list destructuring.
-
(Or is that infinite recursion? I'm rusty but I'm sure there is some trick like that...)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!