Open mathrick opened 2 years ago
For example:
(match '(foo :operator or) ((lambda-list &rest rest &optional asd))) => Pattern: (((LIST* '&AUX TRIVIA.LEVEL2.IMPL::ARGV) (MULTIPLE-VALUE-BIND (TRIVIA.LEVEL2.IMPL::ARGV REST) (TRIVIA.LEVEL2.IMPL::TAKE-WHILE TRIVIA.LEVEL2.IMPL::ARGV #'TRIVIA.LEVEL2.IMPL::!LAMBDA-LIST-KEYWORD-P) (WHEN TRIVIA.LEVEL2.IMPL::ARGV (PUSH `(:AUX ,@(MAPCAR #'ALEXANDRIA:ENSURE-LIST TRIVIA.LEVEL2.IMPL::ARGV)) TRIVIA.LEVEL2.IMPL::RESULTS)) (EMATCH REST #1=(NIL)))) #1#) Values: ((&OPTIONAL ASD)) [Condition of type MATCH-ERROR]
Versus SBCL's error when using DESTRUCTURING-BIND:
DESTRUCTURING-BIND
(destructuring-bind (&rest rest &optional asd) '(foo :operator or)) => misplaced &OPTIONAL in lambda list: (&REST REST &OPTIONAL ASD) [Condition of type SB-INT:SIMPLE-PROGRAM-ERROR]
The same applies to &REST:
&REST
(match '(foo :operator or) ((lambda-list name &key operator &rest rest))) ;; versus (destructuring-bind (name &key operator &rest rest) '(foo :operator or))
For example:
Versus SBCL's error when using
DESTRUCTURING-BIND
:The same applies to
&REST
: