aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/higher/remove.h
AgeCommit message (Collapse)Author
2015-02-17Reimplemented `TakeWhile` and `DropWhile` in terms of `ListIndex`Adrian Kummerlaender
* new higher order list operation `ListIndex` returns the index of the first list element satisfying a given predicate function ** this enables finding the split index required for both `TakeWhile` and `DropWhile` ** actual list manipulation is then performed using lower order `Take` or `Drop` ** analogously to `list-index` in SRFI-1 ** added appropriate test case * added higher order predicate utility function `utility::predicate_assurance` ** as its name implies this function enables assuring that a value satisfies a given predicate *** if this is not the case a surrogate value is returned instead ** this is used to return a appropriate size value if the `ListIndex` call fails because no element satisfies its predicate ** `detail::predicate_negator` was moved from `Remove`'s implementation details into the newly introduced `utility` namespace *** as it is required by both `TakeWhile` and `DropWhile` in addition to `Remove` * continuation of 8e49cc6
2015-02-15Reduced `Filter` and `Remove` implementations to direct aliasesAdrian Kummerlaender
* i.e. instead of defining full class templates in the `detail` namespace we only define predicate helpers * I don't like how some symbols have to be prefixed with `tav::` in the `detail` namespace to prevent conflicts - this is one reason why as much implementation as possible should be moved to template aliases
2015-02-15Moved class-based implementations into `detail` namespaceAdrian Kummerlaender
* while class templates enable e.g. hiding implementation details they also require evaluation via `Eval` ** this clutters up the actual logic and is now hidden behind aliae that perform the evaluation