Skip to content

Instantly share code, notes, and snippets.

@cohalz
Last active January 4, 2016 03:09
Show Gist options
  • Select an option

  • Save cohalz/8560143 to your computer and use it in GitHub Desktop.

Select an option

Save cohalz/8560143 to your computer and use it in GitHub Desktop.
let rec nested_length = function
| [] -> 0
| []::xs -> nested_length xs
| (x::ls)::xs -> 1 + nested_length (ls::xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment