Skip to content

Instantly share code, notes, and snippets.

@pete
Created October 10, 2008 03:52
Show Gist options
  • Save pete/15985 to your computer and use it in GitHub Desktop.
Save pete/15985 to your computer and use it in GitHub Desktop.
; A thing:
'a
; Some things:
'*b
; A thing with criteria:
'(int? c)
; Some things with criteria:
'(int? *d)
; At least x things, no more than y things:
'(true *f (x y))
; x to y things, with criteria:
'(int? *f (x y))
; A sub-pattern:
'(sub g (sub-pattern here)) ; g ends up with the binding. Optional?
; x to y repetitions of the sub-pattern
'(sub *g (x y) (sub-pattern))
; Back-reference to 'a:
'(back h 'a)
; A thing or another thing
'(or i '(sub-pattern) '(sub-pattern))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment