Age | Commit message (Collapse) | Author |
|
* unifies the common functionality between `Take` and `Drop`
* renamed `basic.h` to `length.h` as it only contains the `Length` implementation
|
|
* `detail::generate_nested_structure` offers a higher order nested structure constructor for procedural list generation
* renamed `Fold` implementation details
|
|
* opens up the possibility of implementing different sort algorithms in this library
* removed now unnecessary namespace prefixes
|
|
|
|
* continuation of 8e49cc6
* list constructor was generalized to a _variadic fold_
|
|
* continuation of 8e49cc6f8f
|
|
* 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
|
|
* 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
|
|
* replaces `typename *::type` constructs with `Eval` applications
* aims to further unify function evaluation
|
|
* `type` is used to represent evaluation of a template
* accessing the `function` doesn't evaluate it as it is the template itself
|
|
|
|
* analogously to `IsPair`
|
|
* moved internals into separate header i.e. the `detail` namespace relating to `Apply`
* implemented automatic alias selection by implementing aliae of the basic variadic `type` template alias in different base classes
** variadic partial application is implemented in `detail::apply_variadic`
*** `detail::apply_single` and `detail::apply_pair` define aliae to `detail::apply_variadic`'s `type` template alias
*** both restricted aliae derive from `detail::apply_variadic`
** `Apply` derives from any of the aliae defining base classes depending on the count of placeholders as determined by `detail::count_placeholders`
*** `Apply` is guaranteed to always be derived from `detail::apply_variadic` one way or the other
* changed functions, test cases and examples depending on `Apply` accordingly
** `Length` had to be reimplemented without `Apply` as it doesn't allow usage of aliae expecting a different count of arguments anymore
*** this is a advantage in the sense that core functionality of _TypeAsValue_ now doesn't depend on this complex partial application implementation anymore
*** such functionality may be reimplemented separately from `Apply`
* removed unnecessary `tav` namespace prefixes
|
|
* as it is commonly required functionality and as such should be provided by this library
|
|
* added further test cases for `Sort` as well as `Nth` aliae
|
|
* increases expressiveness in some contexts
* renamed `Partition` list template parameter to avoid confusion
|
|
* _Quicksort_ is the algorithm of choice
** it lends itself quite well to the _TypeAsValue_ approach because of its recursive nature
** this required implementation of a `Drop` counterpart to `Take`
* the middle item of a given list is selected as the _pivot_ element
* the `List` list contructor had to be expanded to allow `void` arguments inside its variadic parameter pack
* added appropriate test cases
|
|
* this is analogous to _Scheme_ where a pair (dot-expression) is returned from a call to `cons`
* `Head` and `Tail` are kept as direct references to the `CAR` and `CDR` values of a pair to match e.g. the math operators
|
|
* all other functions sans `Cons` are resolved when the respective member `*::type` is instantiated
* this was changed soely to increase coherence
|
|
* both depict the very usecase partial function application via `Apply` is suited for
|
|
* analogously to how `Contains` is implemented as a wrapper around `Any`
* added appropriate test case and lessened restrictions on `Contains`'s comparator
|
|
|
|
* as its name implies this function returns the longest initial prefix of a list that satisfies a given _Predicate_
* added appropriate test case
|
|
* added appropriate test case
* other queries in `query.h` may be redefined in terms of `Find`
|
|
* `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
|
|
* there is no reason to keep them in the same header
|
|
* this function illustrates the use case `Apply` is currently intended for
* moved `Take` and `Nth` into separate files to resolve header resolution conflicts
|
|
* as its name implies this function counts the amount of elements satisfying a given _function_
* added appropriate test case
|
|
* 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 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
|
|
|