Extended cond
cond
has been extended with the extra test (?= pat expr)
which tests
if the result of expr
matches pat
. If so, it binds the variables in
pat
which can be used in the cond
. An optional guard is allowed
here.
An example:
(cond ((foo x) ...)
((?= (cons x xs) (when (is_atom x)) (bar y))
(fubar xs (baz x)))
((?= (tuple 'ok x) (baz y))
(zipit x))
... )