Skip to content

Instantly share code, notes, and snippets.

@lotabout
Created May 26, 2012 03:00
Show Gist options
  • Save lotabout/2791878 to your computer and use it in GitHub Desktop.
Save lotabout/2791878 to your computer and use it in GitHub Desktop.
sssfd
magic :: Int -> Int -> [Int]
magic 0 _ = []
magic m n = m : (magic n (m+n))
getIt :: [Int] -> Int -> Int
getIt [] _ = 0
getIt (x:xs) 1 = x
getIt (x:xs) n = getIt xs (n-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment