Skeleton code:
fun hw1(inFile : string, outFile : string) =
(* Open input and output file streams, read first input line from the input file stream *)
File Stream
(* Convert the string type of the lines read and alphabet string to list type*)
(* Perform alphabet checks on these lists *)
(*Write the resultant value – true or false to the output file *)
( * Remember to flush the outStream – refer resources on TestIO to see how flushOut is done. *)
You can use TextIO.openIn and TextIO.openOut for the file stream input and output.
To read each line from a file, you can use the TextIO.inputLine function. This function returns a
string option type. (Note that ‘string’ type and ‘string option’ type are different). The options it
returns are either NONE or SOME(c) depending on content of the line read. If a line is read
successfully, it returns SOME(c) and if there is no more data to read, it returns NONE. So to
keep reading the file line by line, your code has to keep reading as long as there is SOME(c)
Last Completed Projects
| topic title | academic level | Writer | delivered |
|---|
Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.
Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.
[order_calculator]