Question: Kindly solve it in Standard ML programming language. Write an ML function with name and type strip : (string * string) unit that inputs the

Kindly solve it in Standard ML programming language. Kindly solve it in Standard ML programming language. Write an ML function

Write an ML function with name and type strip : (string * string) unit that inputs the names of a file for reading and a file for writing. The input file will contain multiple lines of text of either integers or non-integers. Your function will write to the output file the same lines of text but with the non-integers removed. For example, if the input file is named input.txt and contains: 43 go 121 7 bulldogs 1234 Then your function should work as follows: -strip("input.txt","output.txt");valit=():unit And the output file named output.txt shall contain: 4312171234 Specifications/Notes: - You will not know the number of lines in the file in advance. - It is possible the file will be blank, in which case your function should create a blank output file. - You will not know the names of the files in advance. - You shall use Int.fromString and TextIO.inputLine to process the integers from the file. No other structures or library functions are allowed without explicit permission. - To assist in readability, break up tasks by writing helper functions when possible. - Comment your code briefly but thoroughly. NOTE: You must use the functional/recursive programming style with pattern matching where appropriate. Do not use loops, "global" variable bindings, or other procedural techniques (e.g., no huge "if-then-else" chains)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!