Created
November 12, 2014 18:55
-
-
Save jergason/cd99acc1c28631a0d8eb to your computer and use it in GitHub Desktop.
what am i even doing
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
f :: Int -> [Int] -> [Int] | |
f n arr = -- Complete this function | |
concat $ map (makeN n) arr | |
makeN :: Int -> (Int -> [Int]) | |
makeN n = | |
(\x -> map (\i -> x) [1..n]) | |
-- This part handles the Input and Output and can be used as it is. Do not modify this part. | |
main :: IO () | |
main = getContents >>= | |
mapM_ print. (\(n:arr) -> f n arr). (map read). words |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment