diff --git a/libraries/list-utilities.xml b/libraries/list-utilities.xml index cc526d22..88af9cf6 100644 --- a/libraries/list-utilities.xml +++ b/libraries/list-utilities.xml @@ -1 +1 @@ -Take any number of input lists, and create a new list containing the items of the input lists. So APPEND [A B] [C D] where the [...] are lists reports the list [A B C D] not [[A B] [C D]].
11111
Reports a new list containing the items of the input list, but in the opposite order.
1inputresult
Reports a new list whose items are the same as in the input list, except that if two or more equal items appear in the input list, only the last one is kept in the result.
1
Reports a sorted version of the list in its first input slot, using the comparison function in the second input slot. For a list of numbers, using < as the comparison function will sort from low to high; using > will sort from high to low.
copy of datasplitmerge11#1#2
The second input is an "association list," a list of two-item lists. Each of those smaller lists has a "key" as its first item and a "value" as its second. ASSOC reports the first key-value pair in the association list whose key matches the first input.
11
This block applies the given function to each item of the given list, like the primitive MAP block, but with two differences: 1. The # variable provided will contain the item number of the item currently being used in the given function: 1 for item 1, and so on. You read the variable in your function; don't set it. 2. You can provide more than one input list. If so, the lengths of all the lists should be the same, and the function you supply must expect as many inputs as you have lists (i.e., that many empty input slots in the function).
#11datacountmapmany##1#1data listscount
This block makes a new list containing selected items from the given list, like the primitive KEEP block. What's different is that it provides the # variable for use in your predicate function. It will contain the item number (in the original list) of the item being examined by the predicate.
#1datacount1
This block carries out the given script for each item of the given list, like the primitive FOR EACH. What's different is that it provides the # variable, which will contain the item number in the list of each item in turn, 1 while processing item 1, and so on.
\ No newline at end of file +Take any number of input lists, and create a new list containing the items of the input lists. So APPEND [A B] [C D] where the [...] are lists reports the list [A B C D] not [[A B] [C D]].
ca:concatena _ 11111
Reports a new list containing the items of the input list, but in the opposite order.
ca:capgira _ 1inputresult
Reports a new list whose items are the same as in the input list, except that if two or more equal items appear in the input list, only the last one is kept in the result.
ca:elimina els duplicats de _ 1
Reports a sorted version of the list in its first input slot, using the comparison function in the second input slot. For a list of numbers, using < as the comparison function will sort from low to high; using > will sort from high to low.
ca:ordena _ segons criteri _ copy of datasplitmerge11#1#2
The second input is an "association list," a list of two-item lists. Each of those smaller lists has a "key" as its first item and a "value" as its second. ASSOC reports the first key-value pair in the association list whose key matches the first input.
ca:associació _ _ 11
This block applies the given function to each item of the given list, like the primitive MAP block, but with two differences: 1. The # variable provided will contain the item number of the item currently being used in the given function: 1 for item 1, and so on. You read the variable in your function; don't set it. 2. You can provide more than one input list. If so, the lengths of all the lists should be the same, and the function you supply must expect as many inputs as you have lists (i.e., that many empty input slots in the function).
ca:_ mapeja _ sobre _ #11datacountmapmany##1#1data listscount
This block makes a new list containing selected items from the given list, like the primitive KEEP block. What's different is that it provides the # variable for use in your predicate function. It will contain the item number (in the original list) of the item being examined by the predicate.
ca:_ manté els elements on _ de _ #1datacount1
This block carries out the given script for each item of the given list, like the primitive FOR EACH. What's different is that it provides the # variable, which will contain the item number in the list of each item in turn, 1 while processing item 1, and so on.
ca:_ per cada _ de _ _
\ No newline at end of file