rfc:functional-elements
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:functional-elements [2008/03/16 14:26] – Rewriting required functionality example lstrojny | rfc:functional-elements [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 38: | Line 38: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | |||
==== Required functionality ==== | ==== Required functionality ==== | ||
Extracting the required functionality to leads to the following required additions: | Extracting the required functionality to leads to the following required additions: | ||
* [[rfc: | * [[rfc: | ||
- | * function is_traversable(): | + | * [[rfc:: |
- | * function iterate(): Walks over a traversable list and does nothing | + | * [[rfc: |
- | * function iterator_true(): | + | * function iterator_true(): |
- | * function iterator_false(): | + | * function iterator_false(): |
+ | |||
+ | ==== Modified use cases ==== | ||
+ | === UC-1: Iterating over an aggregation of objects === | ||
+ | <code php> | ||
+ | iterate(new CallIterator($list, | ||
+ | </ | ||
+ | |||
+ | === UC-2: Iterating over an aggregation of objects and keeping the results === | ||
+ | <code php> | ||
+ | $result = iterate(new CallIterator($list, | ||
+ | </ | ||
rfc/functional-elements.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1