Skip to content

Instantly share code, notes, and snippets.

@cohama
Last active December 19, 2015 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cohama/6de0583b1c5fe6a1b009 to your computer and use it in GitHub Desktop.
Save cohama/6de0583b1c5fe6a1b009 to your computer and use it in GitHub Desktop.
fn :: [String] -> Int -> String
fn ~(h:t) n = if n == 0
then "oops."
else h ++ ":" ++ show t
main :: IO ()
main = putStrLn $ fn [] 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment