aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation
AgeCommit message (Collapse)Author
2015-01-26Redefined `Length` in terms of `Apply` and `Fold`Adrian Kummerlaender
* this function illustrates the use case `Apply` is currently intended for * moved `Take` and `Nth` into separate files to resolve header resolution conflicts
2015-01-25Implemented `Count` in terms of `Fold` and `Map`Adrian Kummerlaender
* as its name implies this function counts the amount of elements satisfying a given _function_ * added appropriate test case
2015-01-22Implemented Scheme like `Concatenate` in terms of `Fold` and `Append`Adrian Kummerlaender
* added appropriate test case
2015-01-22Renamed `Concatenate` to `Append` to match Scheme function namingAdrian Kummerlaender
2015-01-21Implemented `Contains` in terms of `Any`Adrian Kummerlaender
* as its name implies this _function_ simplifies checking if a specific value is contained within a given list * updated `Map` to actually resolve the provided _function_
2015-01-21Moved `Reverse` into separate headerAdrian Kummerlaender
* it is not in itself a higher order function but only based on one
2015-01-20Added higher order list query `None`Adrian Kummerlaender
2015-01-20Implemented higher order list queries `All` and `Any`Adrian Kummerlaender
* in terms of `Fold` and `Map`, not the most efficient but reasonably concise * added appropriate test cases
2015-01-19Implemented `Filter` in terms of `Fold`Adrian Kummerlaender
* as its name implies this _function_ only returns elements which evaluate to _true_ when passed to a given _function_ ** this marks the moment where _TypeAsValue_ supports something _ConstList_ does not, i.e. primary goal is achieved *** namely returning different types depending on the actual _values_ of a _Cons_ structure * added appropriate test case
2015-01-18Implemented `Reverse` function in terms of `Fold`Adrian Kummerlaender
2015-01-18Implemented `Map` in terms of `Fold`Adrian Kummerlaender
* as its name implies this _function_ applies a given _function_ to each element of a _Cons_ structure * added appropriate test case
2015-01-18Reimplemented `Length` function in terms of `Fold`Adrian Kummerlaender
* this removes the need for maintaining a partial overload of `Length` * the recursive traversion of the _Cons_ structure is now implemented by `Fold` instead of needlessly duplicating it
2015-01-18Implemented higher order function `fold`Adrian Kummerlaender
* applies a given _function_ to each _Cons_ starting with a initial value * added appropriate test case
2015-01-17Replaced `If` based `Nth` implementation with partial specializationsAdrian Kummerlaender
* partial specializations offer control over lazy type instantiation ** `If` is currently only a `std::conditional` wrapper and requires further refinement to be really useful for this kind of use case
2015-01-17Implemented `Take` functionAdrian Kummerlaender
* as its name implies this function _takes_ a maximum of _Count_ elements of a list * added appropriate test case
2015-01-17Implemented `Nth` functionAdrian Kummerlaender
* as its name implies this function returns the _nth_ value of a given _Cons_ structure * added appropriate test case
2015-01-17Extracted list operations into separate _operation_ headersAdrian Kummerlaender