Skip to content

Instantly share code, notes, and snippets.

@egisatoshi
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egisatoshi/b25a6207413d0e106bec to your computer and use it in GitHub Desktop.
Save egisatoshi/b25a6207413d0e106bec to your computer and use it in GitHub Desktop.
range pattern
> (match-all (between 1 100) (set integer) [<cons (& ?(lte? 32 $) ?(lt? $ 64) $x) _> x])
{32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63}
> (car (match-all (between 1 100) (set integer) [<cons (& ?(lte? 32 $) ?(lt? $ 64) $x) _> x]))
32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment