Created
April 28, 2010 12:32
-
-
Save duboisf/382076 to your computer and use it in GitHub Desktop.
tail.hs
This file contains 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
import System.Environment (getArgs) | |
main = | |
getArgs >>= \[nbLines, filename] -> | |
lines `fmap` readFile filename >>= \contents -> | |
mapM_ putStrLn (drop (length contents - (read nbLines :: Int)) contents) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment