Age | Commit message (Collapse) | Author |
|
* as its name implies this function counts the amount of elements satisfying a given _function_
* added appropriate test case
|
|
* redefined `Even` in terms of `Modulo` and removed unnecessary dependent name declarators
* added appropriate test case, also for `Square`
|
|
* as its name implies this function returns a list of `Count` elements of value `Element`
* added appropriate test case
|
|
* added `Square` function to math operations header to facilitate a simple test case
* added appropriate test case
|
|
* 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
|
|
|
|
* added appropriate test case
|
|
|
|
* 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_
|
|
* it is not in itself a higher order function but only based on one
|
|
|
|
|
|
* in terms of `Fold` and `Map`, not the most efficient but reasonably concise
* added appropriate test cases
|
|
|
|
|
|
|
|
* 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
|
|
* it may be useful for more than test cases
|
|
* 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
|
|
|
|
* as its name implies this _function_ applies a given _function_ to each element of a _Cons_ structure
* added appropriate test case
|
|
* 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
|
|
* applies a given _function_ to each _Cons_ starting with a initial value
* added appropriate test case
|
|
* 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
|
|
* as its name implies this function _takes_ a maximum of _Count_ elements of a list
* added appropriate test case
|
|
* as its name implies this function returns the _nth_ value of a given _Cons_ structure
* added appropriate test case
|
|
|
|
* 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
|
|
|
|
* concatenates two given _Cons_ based lists into a single one
|
|
* `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
|
|
|
|
|
|
|
|
|
|
|
|
* the result type now depends on the `decltype` of the performed operation
|
|
|
|
|