aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-02-05Reimplemented `Contains` and `Delete` in terms of `Apply`Adrian Kummerlaender
* both depict the very usecase partial function application via `Apply` is suited for
2015-02-05Reimplemented `removeMultiplesOf` in terms of a partial function applicationAdrian Kummerlaender
2015-02-04Implemented the Sieve of Eratosthenes as a basic exampleAdrian Kummerlaender
2015-02-03Added special `for_each` function for iterating lists at runtimeAdrian Kummerlaender
* i.e. we probably will want to access our compile time computed values at runtime sooner or later * runtime iteration using e.g. a normal _for-loop_ is not possible as we obviously can't dynamically insert new types into our templates
2015-02-02Implemented `Delete` in terms of `Remove`Adrian Kummerlaender
* analogously to how `Contains` is implemented as a wrapper around `Any` * added appropriate test case and lessened restrictions on `Contains`'s comparator
2015-02-01Restored synchronisation between assert messages and their typesAdrian Kummerlaender
2015-02-01Added `DropWhile` analogously to `TakeWhile`Adrian Kummerlaender
2015-02-01Added some of the new features to the README fileAdrian Kummerlaender
2015-02-01Added `TakeWhile` higher order list operationAdrian Kummerlaender
* as its name implies this function returns the longest initial prefix of a list that satisfies a given _Predicate_ * added appropriate test case
2015-01-31Implemented higher order `Find` list search operationAdrian Kummerlaender
* added appropriate test case * other queries in `query.h` may be redefined in terms of `Find`
2015-01-30Implemented `Remove` and `Partition` higher order list functionsAdrian Kummerlaender
* `Remove` is a basic `Filter` alias that negates its predicate * `Partition` builds on both `Remove` and `Filter` to return both the elements satisfying a predicate and those which don't
2015-01-30Separated `Map` and `Filter`Adrian Kummerlaender
* there is no reason to keep them in the same header
2015-01-29Added `ListOfType` list constructor aliasAdrian Kummerlaender
* enables construction of `Cons` structures using the same value type across all their elements
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-26Added pair and triple aliae for the variadic `Apply` typeAdrian Kummerlaender
2015-01-25Implemented partial function application prototypeAdrian Kummerlaender
* function `Apply` enables partial supply of the template parameters of a given _function_ ** unsupplied parameters may be marked by _placeholders_, i.e. approach is similar to `std::bind` ** returns a template type taking the remaining, unsupplied parameters of the partially applied _function_ * this is a prototype in the sense, that neither full application using `Apply` or partial application of higher order functions is currently supported ** e.g. a `single_type` alias type declaration is required as the variadic template `template<typename...>` doesn't directly map to `template<typename>` * appropriate test cases document current feature set * the goal is to enable a concise defintion of _lambda-like_ expressions for easy specialization of e.g. functors provided to higher order functions
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-24Added `Modulo` math operatorAdrian Kummerlaender
* redefined `Even` in terms of `Modulo` and removed unnecessary dependent name declarators * added appropriate test case, also for `Square`
2015-01-24Added `MakeList` list generatorAdrian Kummerlaender
* as its name implies this function returns a list of `Count` elements of value `Element` * added appropriate test case
2015-01-23Implemented `ListTabulate` in terms of `Iota` and `Map`Adrian Kummerlaender
* added `Square` function to math operations header to facilitate a simple test case * added appropriate test case
2015-01-23Implemented `Iota` list constructorAdrian Kummerlaender
* recursively generates a list of `Count` elements starting at `Initial` and consecutively adding `Step` ** as most functionality of this library this function was modeled after its _Scheme_ equivalent `iota` ** it may be used as the foundation of a set of higher order list generators including e.g. `list-tabulate` * added appropriate test cases
2015-01-22Released _TypeAsValue_ under the terms of the MIT licenseAdrian Kummerlaender
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 `README.md` as overviewAdrian Kummerlaender
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-20Added basic boolean logic operationsAdrian Kummerlaender
2015-01-19Indented test cases to improve readabilityAdrian Kummerlaender
2015-01-19Added type and value equality test caseAdrian Kummerlaender
2015-01-19Replaced Google-Test with `static_assert` based test casesAdrian Kummerlaender
* as everything this library does happens during compile time it can be checked using standard language features ** i.e. `static_assert` already offers everything needed for test cases in this situation
2015-01-19Moved `Odd` helper into math operation headerAdrian Kummerlaender
* it may be useful for more than 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
2015-01-17Implemented `Length` functionAdrian Kummerlaender
* as its name implies this function returns the length of a given _Cons_ structure * result type is `Size<Length>` which wraps `std::size_t` to match the `sizeof` operator
2015-01-17Added Scheme representation to test cases as a kind of documentationAdrian Kummerlaender
2015-01-16Implemented recursive `Concatenate` _Cons_ constructorAdrian Kummerlaender
* concatenates two given _Cons_ based lists into a single one
2015-01-16Implemented basic `Cons` value type and `List` constructorAdrian Kummerlaender
* `Cons` is a straigth forward type _pair_ containing `car` and `cdr` typedefs ** they may be accessed using `Car` and `Cdr` helper template aliases ** there is no enforcement of _Cons_ structure and type equality whatsoever *** i.e. similar to Scheme and different from how it is implemented in _ConstList_ * `List` is a recursive variadic helper template for constructing `Cons` value types ** simplifies _Cons_ construction and may be expanded to offer type deduction and built upon to enforce type equality * added appropriate test cases
2015-01-16Capitalized math operations to fit naming schemeAdrian Kummerlaender
2015-01-16Implemented `tav::If` as `std::conditional` wrapperAdrian Kummerlaender
2015-01-16Redefined function template structs as template aliasesAdrian Kummerlaender