Skip to content

Instantly share code, notes, and snippets.

@kaveet
Last active November 16, 2016 14:01
Show Gist options
  • Save kaveet/e1a7e272c44eb79f594d4db3b9d03db8 to your computer and use it in GitHub Desktop.
Save kaveet/e1a7e272c44eb79f594d4db3b9d03db8 to your computer and use it in GitHub Desktop.
Haskell Recrusive Length Function
module Length where
length :: [a] -> Int
length [] = 0
length (_:xs) = 1 + length xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment