Title here
Summary here
Here we use range
to sum the numbers in a list. Arrays in Standard ML work similarly.
range
on arrays and lists provides both the index and value for each entry. In the first example, we didn’t need the index, so we ignored it. Sometimes we actually want the indexes though.
range
on map iterates over key/value pairs. In Standard ML, we use a list of tuples to represent key-value mappings.
range
can also iterate over just the keys of a map.
range
on strings iterates over Unicode code points. The first value is the starting byte index of the rune
and the second the rune
itself.