Skip to content

Instantly share code, notes, and snippets.

@siritori
Created December 16, 2012 18:16
Show Gist options
  • Save siritori/4310589 to your computer and use it in GitHub Desktop.
Save siritori/4310589 to your computer and use it in GitHub Desktop.
let rec seq n_from n_to =
if n_from <= n_to then
let rec seq_ n acc = match n with
| n when n = n_from-1 -> acc
| _ -> seq_ (n-1) (n::acc)
in seq_ n_to []
else
[]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment