December 2021
Beginner
840 pages
47h 29m
English
I/O is among the impure features of ML since I/O in ML involves side effect.
The option data type has two values: NONE and SOME. Use isSome (χ) to determine the value of a variable of type option. Use valOf (χ) to extract the value of a variable of type option. A string option list is not the same as a string list.
Standard Input
The standard input stream generally does not need to be opened and closed.
File Input
The following example demonstrates file input in ML.
Read now
Unlock full access