(pcase-defmacro map (&rest args)
"pcase pattern matching map elements.
+
Matches if the object is a map (list, hash-table or array), and
-binds values from ARGS to their corresponding elements of the map.
+each PATTERN matches the corresponding elements of the map.
+
+Supernumerary elements of the map are ignore if less ARGS are
+given, and the match does not fail.
-ARGS can be a list elements of the form (KEY PAT), in which case
-KEY in an unquoted form.
+ARGS can be a list of the form (KEY PAT), in which case KEY in an
+unquoted form.
ARGS can also be a list of symbols, which stands for ('SYMBOL
SYMBOL)."
,@body)
,(cadr spec)))
-(pcase-defmacro seq (&rest args)
+(pcase-defmacro seq (&rest patterns)
"pcase pattern matching sequence elements.
+
Matches if the object is a sequence (list, string or vector), and
-binds each element of ARGS to the corresponding element of the
-sequence."
+each PATTERN matches the corresponding element of the sequence.
+
+Supernumerary elements of the sequence are ignore if less
+PATTERNS are given, and the match does not fail."
`(and (pred seq-p)
- ,@(seq--make-pcase-bindings args)))
+ ,@(seq--make-pcase-bindings patterns)))
(defmacro seq-let (args seq &rest body)
"Bind the variables in ARGS to the elements of SEQ then evaluate BODY.