Skip to content

Instantly share code, notes, and snippets.

@jasonbellamy
Created October 19, 2016 01:56
Show Gist options
  • Save jasonbellamy/8da366fe216333c117e17e5b1062cf1e to your computer and use it in GitHub Desktop.
Save jasonbellamy/8da366fe216333c117e17e5b1062cf1e to your computer and use it in GitHub Desktop.
recursive implementation of length
const length = ([head, ...tail]) => (
(head === void 0) ? 0 : 1 + length(tail)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment