Skip to content

Instantly share code, notes, and snippets.

@lmarburger
Created June 19, 2014 12:14
Show Gist options
  • Save lmarburger/1f52c4d4afaf62a73128 to your computer and use it in GitHub Desktop.
Save lmarburger/1f52c4d4afaf62a73128 to your computer and use it in GitHub Desktop.
module lec1
total
ltake : Nat -> List a -> List a
ltake Z _ = []
ltake _ [] = []
ltake (S k) (x :: xs) = x :: (ltake k xs)
-- > ltake 1 []
-- (input):0:0:Incomplete term ltake (fromInteger 1) []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment