Create a gist now

Instantly share code, notes, and snippets.

@l1x /range.re
Created Oct 21, 2017

What would you like to do?
let rec range_aux n acc =>
switch (n, acc) {
| (0, acc) => acc
| (n, acc) => range_aux (n-1) [(n-1), ...acc]
};
let range x => range_aux x [];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment