file: 10-C-lists.muf package: muf status: alpha
maplist function accepts a block of lists and a
function, which must accept as many arguments as there are
lists in the block, and return a value. On the first call to
the given function, it is passed the first cons cell (not
element!) in each of the given lists. On the second call,
it recieves the second cons cell from each list. This
continues until one or more of the lists run out of
elements. The values returned from the successive calls are
collected into a list, which is returned as the final result:
Stack: [ [ "a" "b" "c" ]l | :: car ; maplist --> list Stack: list first list second list third Stack: "a" "b" "c"
See section mapl. See section mapcon. See section mapcar.
Go to the first, previous, next, last section, table of contents.