by IHackedHN · 17y ago · 0 comments
arc> (let (x . y) '(a b c) y)
(b c)Anyway, is it safe to assume that you're not going to try to get me arrested or anything?
(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.
You could go a step further and have a special ignore symbol, (for instance * ) like most pattern matching languages/libraries have with the property that it can appear multiple times:
arc> (let (x * y . *) '(a b c d e f) y)
c