Created
August 21, 2015 01:22
-
-
Save spolischook/ef73c312e62ebe35092e to your computer and use it in GitHub Desktop.
right implementation take with recursion
This file contains hidden or 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
| take' :: Int -> [Int] -> [Int] | |
| take' x [] = [] | |
| take' 0 xs = [] | |
| take' x (xx:xxs) = xx : take' (x-1) xxs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment