Difference between revisions of "Array.collect()"

From ZCubes Wiki
Jump to navigation Jump to search
Line 3: Line 3:
  
 
Related to  
 
Related to  
 +
0 10 - takeall
 +
 +
1 11 - takewhile
 +
 +
2 12 - dropwhile
  
 
Array.prototype.collectwhile=Array.prototype.filteroncondition.curry(0);
 
Array.prototype.collectwhile=Array.prototype.filteroncondition.curry(0);

Revision as of 14:47, 4 February 2020

Also same as Array.suchthat()


Related to 0 10 - takeall

1 11 - takewhile

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;

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

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


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

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

Array.prototype.collectasvector=Array.prototype.suchthatasvector;

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

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


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

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

To be documented.