Last active
October 2, 2015 16:43
-
-
Save lucamolteni/07ee1e66864356dd29d5 to your computer and use it in GitHub Desktop.
Replicate
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
| module Main where | |
| import Control.Monad | |
| main :: IO () | |
| main = do putStrLn "Enter the amount of line to read" | |
| s <- readLn :: IO Int | |
| putStrLn ("Now enter " ++ show s ++ " lines ") | |
| elements <- replicateM s getLine | |
| let result = doSomething elements | |
| print result | |
| return () | |
| doSomething :: [String] -> [String] | |
| doSomething = map (++ "_operation on element") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Total version: