scan(L, f)
scan(L, L', f)
scan(n, f)
scan(L, f) applies the function f to each element of the list L. The function values are discarded.
|
|
scan(n, f) applies the function f to each element of the list 0, 1, ..., n-1
|
|
The keyword break can be used to terminate the scan prematurely, and optionally to specify a return value for the expression. Here we use it to locate the first even number in a list.
|
The object scan is a compiled function.