Difference between revisions of "Array.collect()"

From ZCubes Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
*[[ Z3 | << Z3 Home ]]
 +
*[[ Z%5E3_Language_Documentation | Z3 Language Documentation]]
 +
*[[ Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member Functions]]
 +
 
Also same as [[Array.suchthat() | Array.suchthat()]]
 
Also same as [[Array.suchthat() | Array.suchthat()]]
  
 +
Related to
 +
 +
Array.filteroncondition= function (SomeTakeDropOrAllFlag, SomeFunction, SomeParameter)
 +
 +
Matches are applied to element or rows in an array with SomeFunctions and SomeParameter mentioned. ''
  
 
Related to  
 
Related to  
Line 9: Line 18:
 
2 12 - dropwhile
 
2 12 - dropwhile
  
Array.prototype.collectwhile=Array.prototype.filteroncondition.curry(0);
 
  
Array.prototype.suchthat=Array.prototype.filteroncondition.curry(0);
 
  
Array.prototype.collect=Array.prototype.suchthat;
+
asvector versions work on elements/arrays at the top level. The simple versions work at every element level (goes into subarrays when need be).
 +
 
 +
Each element is used to match for the following:
 +
 
 +
Array.collectwhile=Array.filteroncondition.curry(0);
 +
 
 +
Array.suchthat=Array.filteroncondition.curry(0);
 +
 
 +
Array.collect=Array.suchthat;
  
Array.prototype.takewhile=Array.prototype.filteroncondition.curry(1);
+
Array.takewhile=Array.filteroncondition.curry(1);
  
Array.prototype.dropwhile=Array.prototype.filteroncondition.curry(2);
+
Array.dropwhile=Array.filteroncondition.curry(2);
  
 +
Each element at top level is used to match for the following:
  
Array.prototype.collectwhileasvector=Array.prototype.filteroncondition.curry(10);
+
Array.collectwhileasvector=Array.filteroncondition.curry(10);
  
Array.prototype.suchthatasvector=Array.prototype.filteroncondition.curry(10);
+
Array.suchthatasvector=Array.filteroncondition.curry(10);
  
Array.prototype.collectasvector=Array.prototype.suchthatasvector;
+
Array.collectasvector=Array.suchthatasvector;
  
Array.prototype.takewhileasvector=Array.prototype.filteroncondition.curry(11);
+
Array.takewhileasvector=Array.filteroncondition.curry(11);
  
Array.prototype.dropwhileasvector=Array.prototype.filteroncondition.curry(12);
+
Array.dropwhileasvector=Array.filteroncondition.curry(12);
  
  
Array.prototype.splitwhile=Array.prototype.partitiononcondition.curry(0);
+
Array.splitwhile=Array.partitiononcondition.curry(0);
  
Array.prototype.splitwhileasvector=Array.prototype.partitiononcondition.curry(10);
+
Array.splitwhileasvector=Array.partitiononcondition.curry(10);
  
To be documented.
+
To be documented in more detail.

Latest revision as of 03:22, 30 April 2020

Also same as Array.suchthat()

Related to

Array.filteroncondition= function (SomeTakeDropOrAllFlag, SomeFunction, SomeParameter)

Matches are applied to element or rows in an array with SomeFunctions and SomeParameter mentioned.

Related to 0 10 - takeall

1 11 - takewhile

2 12 - dropwhile


asvector versions work on elements/arrays at the top level. The simple versions work at every element level (goes into subarrays when need be).

Each element is used to match for the following:

Array.collectwhile=Array.filteroncondition.curry(0);

Array.suchthat=Array.filteroncondition.curry(0);

Array.collect=Array.suchthat;

Array.takewhile=Array.filteroncondition.curry(1);

Array.dropwhile=Array.filteroncondition.curry(2);

Each element at top level is used to match for the following:

Array.collectwhileasvector=Array.filteroncondition.curry(10);

Array.suchthatasvector=Array.filteroncondition.curry(10);

Array.collectasvector=Array.suchthatasvector;

Array.takewhileasvector=Array.filteroncondition.curry(11);

Array.dropwhileasvector=Array.filteroncondition.curry(12);


Array.splitwhile=Array.partitiononcondition.curry(0);

Array.splitwhileasvector=Array.partitiononcondition.curry(10);

To be documented in more detail.