Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
computelength
// naive implementation
let rec length list =
match list with
| [] -> 0
| _::tail -> 1 + computeLength tail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment