SML program

Write a program in SML that reads from a input.txt file and outputs to an output.txt file whether the line is an pangram or not. I have

put an example input.txt and output.txt to give you an idea of what we are doing.

Skeleton code:
fun hw1(inFile : string, outFile : string) =
(* Open input and output file streams, read first input line from the input file stream *)
(* To read subsequent lines, you can make use of a helper function *) – see resources on SML
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)

TAKE ADVANTAGE OF OUR PROMOTIONAL DISCOUNT DISPLAYED ON THE WEBSITE AND GET A DISCOUNT FOR YOUR PAPER NOW!

READ ALSO :   Performance Management and Training