Created
October 19, 2016 01:56
-
-
Save jasonbellamy/8da366fe216333c117e17e5b1062cf1e to your computer and use it in GitHub Desktop.
recursive implementation of length
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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