CS代考 – cscodehelp代写

#############################################################################
################ DO NOT MODIFY THIS CODE ####################################
#############################################################################

Copyright By cscodehelp代写 加微信 cscodehelp

import System.Environment
import System.IO

main :: IO ()
args <- getArgs let files = get_names args let input = fst files let output = snd files putStrLn input putStrLn output in_handle <- openFile input ReadMode out_handle <- openFile output WriteMode mainloop in_handle out_handle hClose in_handle hClose out_handle mainloop :: Handle -> Handle -> IO ()
mainloop in_handle out_handle =
do in_eof <- hIsEOF in_handle then return () else do line <- hGetLine in_handle let line_words = words line print $ evaluate line_words hPutStrLn out_handle $ evaluate line_words mainloop in_handle out_handle get_names :: [String] -> (String, String)
get_names (arg1:arg2:_) =
let in_file = arg1
out_file = arg2
in (in_file, out_file)
#############################################################################
################ Write your code below this line ############################
#############################################################################

— Your implementation goes here. Feel free to add more functions.
evaluate :: [String] -> String
evaluate (a:xs) = unwords xs
evaluate [] = “”

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *