ListFunctions3(A, B, C)¶
ListFunctions3 implements utility functions that operate on three kinds of lists, each with a possibly different type of element.
- map: ((A, B) -> C, List A, List B) -> List C
map(fn, u1, u2)applies the binary function
fnto corresponding elements of lists
u2and returns a list of the results (in the same order). Thus
map(/, [1, 2, 3], [4, 5, 6]) = [1/4, 2/5, 1/2]. The computation terminates when the end of either list is reached. That is, the length of the result list is equal to the minimum of the lengths of