Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6784d57ea1
Fetching contributors…

Cannot retrieve contributors at this time

file 12 lines (8 sloc) 0.34 kb
1 2 3 4 5 6 7 8 9 10 11 12

(provide 'pattern-matching)

(do-patterns (list 1 2 3)
(cons first rest) (list first rest)) -> (1 (2 3))

(let* ((val (list 1 2 3))
(cons-pattern-result (cons-pattern '(first rest) val)))
  (cond (cons-pattern-result (let ((first (elt cons-pattern-result 0))
(second (elt cons-pattern-result 1)))

(defmacro do-patterns
Something went wrong with that request. Please try again.