Skip to content

Instantly share code, notes, and snippets.

@spolischook
Created August 21, 2015 01:22
Show Gist options
  • Select an option

  • Save spolischook/ef73c312e62ebe35092e to your computer and use it in GitHub Desktop.

Select an option

Save spolischook/ef73c312e62ebe35092e to your computer and use it in GitHub Desktop.
right implementation take with recursion
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