rfc:functional-elements

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:functional-elements [2008/03/17 09:33]
lstrojny Adding modified use cases
rfc:functional-elements [2008/03/17 09:40]
lstrojny
Line 38: Line 38:
 } }
 </​code>​ </​code>​
 +
  
  
Line 45: Line 46:
   * [[rfc::​functional-elements:​is-traversable|function is_traversable()]]:​ Returns true if a list is traversable (Iterator/​IteratorAggregate/​array)   * [[rfc::​functional-elements:​is-traversable|function is_traversable()]]:​ Returns true if a list is traversable (Iterator/​IteratorAggregate/​array)
   * [[rfc:​functional-elements:​iterate|function iterate()]]:​ Walks over a traversable list and does nothing   * [[rfc:​functional-elements:​iterate|function iterate()]]:​ Walks over a traversable list and does nothing
-  * function iterator_true():​ Walks over a traversable list and assumes every element to be true +  * function iterator_true():​ Walks over a traversable list and assumes every element to be bool(true) 
-  * function iterator_false():​ Walks over a traversable list and assumes every element to be false+  * function iterator_false():​ Walks over a traversable list and assumes every element to be bool(false)
  
 ==== Modified use cases ==== ==== Modified use cases ====
Line 52: Line 53:
 <code php> <code php>
 iterate(new CallIterator($list,​ '​method'​));​ iterate(new CallIterator($list,​ '​method'​));​
 +</​code>​
 +
 +=== UC-2: Iterating over an aggregation of objects and keeping the results ===
 +<code php>
 +$result = iterate(new CallIterator($list,​ '​method'​),​ true);
 </​code>​ </​code>​
  
rfc/functional-elements.txt · Last modified: 2017/09/22 13:28 (external edit)