bldc/tests/test_match_3.lisp

9 lines
165 B
Common Lisp

(define f (lambda (ls)
(match ls
( nil 0 )
( ( (? c) . (? cd)) (+ c (f c)))
( _ 'error-not-a-list))))
(check (eq (f 'kurt) 'error-not-a-list))