Last active
November 16, 2016 14:01
-
-
Save kaveet/e1a7e272c44eb79f594d4db3b9d03db8 to your computer and use it in GitHub Desktop.
Haskell Recrusive Length Function
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
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