|
|
|
firsts list
outputs a list containing the first of each member of the input list. It is an error if any member of the input list is empty. (The input itself may be empty, in which case the output is also empty.) This could be written as
to firsts :list output map "first :list end |
show firsts [[H a l l o] [W o r l d]] ;[H W] to transpose :matrix if emptyp first :matrix [op []] op fput firsts :matrix transpose bfs :matrix end show firsts {{1 2 3}[a b c]} ;{1 a} |
|
|
|