Question: Find the error in the following ML code: fun charListToStringList [ ] = [ ] | charListToStringList ( # ::xs ) =

Find the error in the following ML code:
fun charListToStringList []=[]
| charListToStringList (#""::xs)=""::charListToStringList(xs)
| charListToStringList (#"i"::#"n"::#"t"::xs)= "int"::charListToStringList(xs)
| charListToStringList (x::xs)= Char.toString x :: charListToStringList(xs);
When compiled it throughs the following error:
stdIn:223.27-223.40 Error: non-constructor applied to argument in pattern

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 Programming Questions!