4 ms·
You don't have to name it. It could be _. (let (x . _) '(a b c) x) It sounds like you're treating list destructuring like CL's mvbind. While it's subjecti
by wingo 18y ago
You don't have to name it. It could be _.
(let (x . _) '(a b c) x)
It sounds like you're treating list destructuring like CL's mvbind. While it's subjective of course, I'm more comfortable with the runtime doing what I mean when I control the number of values (modulo `(apply values ...)').
I'm not comfortable with destructuring values "flexibly" when I don't control the data coming in.
- parenthesis 18y agoExcept "_" is a perfectly good name for a symbol in Arc. "nil" could be used instead, since nil isn't allowed to be rebound. (let (x . nil) '(a b c) x) even works already, since (unless it's been changed in some newer version of Arc I haven't installed yet) Arc just silently ignores the let-ing of nil: (let nil t nil) ---> nil