Table of contents

CI

Jln.mp is a single header C++17 metaprogramming library designed for fast compilation speed (strongly inspired by Kvasir::mpl).

Licence: MIT

Online documentation: https://jonathanpoelen.github.io/jln.mp/

Online documentation for v1: https://jonathanpoelen.github.io/jln.mp/v1/

Single file version in standalone branch.

Concepts

Functions of jln.mp are used in 2 stages:

For example, suppose we want to remove void from a sequence. The function to use is jln::mp::remove:

using remove_void = jln::mp::remove<void>;

We can then apply it to our data:

using result = jln::mp::call<remove_void, int, void, double, char>; // result == jln::mp::list<int, double, char>

Now suppose that result must be a std::tuple. Rather than linking with another function, it is possible to combine them in remove_void via a continuation (C parameter).

using remove_void = jln:mp::remove<void, /*C=*/jln::mp::lift<std::tuple>>; using result = jln::mp::call<remove_void, int, void, double, char>; // result == std::tuple<int, double, char>

The default continuations are jln::mp::listify which transforms a sequence into a jln::mp::list and jln::mp::identity which returns the input value.

Jln.mp also has 2 additional namespaces:

Create a function

A function is a type with a f template member.

struct to_tuple { template<class... xs> using f = std::tuple<xs...>; }; jln::mp::call<to_tuple, int, double> == std::tuple<int, double>

In the mind of the library, functions should at least take a continuation.

// equivalent to jln::mp::lift<std::tuple, C> template<class C = jln::mp::identity> struct to_tuple { template<class... xs> using f = jln::mp::call<C, std::tuple<xs...>>; }; jln::mp::call<to_tuple<>, int, double> == std::tuple<int, double>

Glossary

Sequence
a value sequence or a type sequence.
Set
a sequence of unique elements.
Map
a sequence of lists having at least one element (the key). The keys of the map must be unique.
Value
a type with a value member.
Typelist
an instance compatible with template<class...> class T, such as list<>.
Function
a type with a f template member. The number and the nature of the parameters depend on the context of use.
Predicate
a function which takes n argument (usually 1) and returns a boolean.
Meta-function
a template class template<class...> class M.
Lazy meta-function
a meta-function with a type member.
C
Continuation function. Represents the function used to chain calls, typically listify or identity.
TC
True Continuation function. Represents a continuation used when something is found.
FC
False Continuation function. Represents a continuation used when something is not found.
_v suffix
C::f takes values. Usually C::f<jln::mp::int_...> (C++17) or C::f<auto...> (C++20). In the emp namespace, with a few exceptions, this corresponds to a variable template (as for the stl).

Example of real life

Implementation of std::tuple_cat that works with tuple like.

#include "jln/mp/algorithm/make_int_sequence.hpp" #include "jln/mp/algorithm/transform.hpp" #include "jln/mp/algorithm/repeat.hpp" #include "jln/mp/functional/each.hpp" #include "jln/mp/functional/lift.hpp" #include "jln/mp/list/join.hpp" #include <array> #include <tuple> namespace mp = jln::mp; namespace emp = jln::mp::emp; template<class Tuple> struct my_tuple_element { template<class I> using f = std::tuple_element_t<I::value, Tuple>; }; template<class... Tuples> using my_tuple_cat_result_type = mp::call< // Convert a sequence of mp::list to std::tuple mp::join<mp::lift<std::tuple>>, // Convert a tuple like to mp::list of tuple element. // To support tuple-likes, it is necessary to use std::tuple_size and std::tuple_element. // Otherwise, emp::unpack<Tuples> is sufficient. emp::make_int_sequence< std::tuple_size<std::decay_t<Tuples>>, // Convert a sequence of tuple index to a mp::list of tuple element. mp::transform<my_tuple_element<std::decay_t<Tuples>>> >... >; template<class R, mp::int_... ituples, mp::int_... ivalues, class Tuple> constexpr R my_tuple_cat_impl( emp::numbers<ituples...>, emp::numbers<ivalues...>, Tuple t) { // get is looked up by argument-dependent lookup using std::get; return R{ get<ivalues>(get<ituples>(std::move(t)))... }; } template<class... Tuples, class R = my_tuple_cat_result_type<Tuples...>> constexpr R my_tuple_cat(Tuples&&... args) { // ex: tuple_size=3 tuple_size=2 tuple_size=4 // list< 0, 0, 0, 1, 1, 2, 2, 2, 2 > using index_by_tuple = emp::make_int_sequence_c< sizeof...(Tuples), // repeat each index by number of element mp::each<mp::repeat<std::tuple_size<std::decay_t<Tuples>>>..., mp::join<> > >; // ex: tuple_size=3 tuple_size=2 tuple_size=4 // list< 0, 1, 2, 0, 1, 0, 1, 2, 3 > using index_by_value = emp::join< emp::make_int_sequence<std::tuple_size<std::decay_t<Tuples>>>... >; return my_tuple_cat_impl<R>(index_by_tuple{}, index_by_value{}, std::tuple<Tuples&&...>(std::forward<Tuples>(args)...)); } // defines a tuple like //@{ namespace toy { // tuple like struct Vector2D { int x, y; }; template<std::size_t i> constexpr int get(Vector2D const& t) { return i == 0 ? t.x : t.y; } } template<> struct std::tuple_size<::toy::Vector2D> : std::integral_constant<std::size_t, 2> {}; template<size_t i> struct std::tuple_element<i, ::toy::Vector2D> { using type = int; }; //@} // test // @{ constexpr std::tuple<int, float, double> t0{1, 2, 3}; constexpr std::tuple<char, unsigned> t1{4, 5}; constexpr std::tuple<long> t2{6}; constexpr std::array<short, 4> a{7, 8, 9, 10}; constexpr toy::Vector2D v {11, 12}; constexpr auto my_tuple = my_tuple_cat(t0, t1, t2, a, v); using my_tuple_type = std::remove_const_t<decltype(my_tuple)>; using std_tuple = std::tuple< int, float, double, char, unsigned, long, short, short, short, short, int, int>; static_assert(std::is_same_v<my_tuple_type, std_tuple>); static_assert(my_tuple == std::tuple{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}); // @}

FAQ

> Functions are missing in the stacktrace when the compiler displays an error message, how to display them?

Compile with the define JLN_MP_ENABLE_DEBUG at 1 to have errors with more context.

> Error: sorry, unimplemented: mangling record_type or sorry, unimplemented: mangling typename_type with Gcc.

This is a Gcc bug when an algorithm is used in the prototype of a function.

template<class... Ts> mp::call<func, Ts...> foo(); // Must be replaced by template<class... Ts, class R = mp::call<func, Ts...>> R foo();

Files by group

Files in alphabetical order

Functions by group

Functions in alphabetical order

Short descriptions

Group: algorithm

Some<value, next = value>= mp::list<value, next>
None= mp::stop_recursion
unfold<F, C = listify>Unfold F until returning None.
accumulate<F, C = identity>::f<state, seqs...>Computes the recursive invocation of F with the result of the previous invocation and each element of one or more lists traversed in parallel from the beginning to the end.
all_of<Pred, C = identity>::f<xs...>Checks whether a predicate holds for all elements of a sequence.
anticirculant_matrix_with<F = listify, C = listify>::f<xs...>square matrix in which all row vectors are composed of the same elements and each row vector is rotated one element to the left relative to the preceding row vector.
anticirculant_matrix<C = listify>= anticirculant_matrix_with<listify, C>
any_of<Pred, C = identity>Checks whether a predicate holds for at least some element of a sequence.
arrange<Ints, C = listify>Uses a list of indexes to reorder a sequence.
arrange_c<int... ints>
arrange_c_with<C, int... ints>
circulant_matrix_with<F = listify, C = listify>::f<xs...>square matrix in which all row vectors are composed of the same elements and each row vector is rotated one element to the right relative to the preceding row vector.
circulant_matrix<C = listify>= circulant_matrix_with<listify, C>
compare_with<F, Cmp = less<>>comparison on the result of a function.
contains<x, C = identity>Checks whether a value is contained in a list.
count_if<Pred, C = identity>Counts all elements that satisfy a predicate.
count<x, C = identity>Counts all elements identical to a value.
counter_wrapped_with<F, C = listify>::f<xs...>Counts all distinct elements and returns a list of pairs containing the type and the repeat count.
counter<C = listify>Counts all distinct elements and returns a list of pairs containing the type and the repeat count.
ends_with<Seq, C = identity>Checks if the sequence ends with the given prefix.
ends_with<list<Ts...>, C>::f<xs...>= C::f</*...*/>
flatten_once<S = lift<list>, C = listify>Remove 1 dimension level from a sequence.
flatten_once<lift<S, identity>, C>::f<xs...>
flatten_once_f<template<class...> S, C = listify>= flatten_once<lift<S>, C>
flatten<S = lift<list>, C = listify>Recursive version of flatten_once.
flatten<lift<S, identity>, C>::f<xs...>
flatten_f<template<class...> S, C = listify>= flatten<lift<S>, C>
intersperse<x, C = listify>::f<xs...>Inserts a value between each element of a sequence.
is_disjoint_with<Cmp = same<>, C = identity>::f<seqs...>Checks whether value in seqs[0] are disjoint from the value in seqs[1:].
is_disjoint<C = identity>Checks whether value in seqs[0] are disjoint from the value in seqs[1:].
is_sorted<Cmp = less<>, C = identity>::f<xs...>Checks whether a sequence is sorted.
is_subset_with<Cmp = same<>, C = identity>::f<seqs...>Checks whether value in seqs[0] are subset from the value in seqs[1:].
is_subset<C = identity>Checks whether value in seqs[0] are subset from the value in seqs[1:].
is_unique_if<Cmp = same<>, C = identity>::f<xs...>Checks whether all values are unique.
is_unique<C = identity>Checks whether all values are unique.
lexicographical_compare<Cmp = less<>, C = identity>::f<seq1, seq2>Checks if seq1 is lexicographically less than seq2.
lexicographical_compare2<CmpLess = less<>, CmpEq = equal<>, C = identity>::f<seq1, seq2>= C::f<mismatch<CmpEq, lift</*...*/>>::f<seq1, seq2>::f<CmpLess, seq1, seq2>>
merge<Cmp = less<>, C = listify>::f<seq1, seq2>Merges two list into one sorted sequence.
mismatch<Cmp = equal<>, TC = listify, FC = TC>::f<seq1, seq2>Returns mismatching info of elements from two sequences.
mismatch_index<Cmp = equal<>, C = identity>Returns the first mismatching index of elements from two sequences, otherwise the size of the sequences.
none_of<Pred, C = identity>::f<xs...>Checks whether a predicate does not hold for any element of a sequence.
pairwise_fold_and_transform_front<F, Front = identity, C = listify>::f<xs...>Computes the differences between adjacent pair of elements.
pairwise_fold<F, C = listify>Computes the differences between adjacent pair of elements.
prefix<x, C = listify>::f<xs...>Inserts a value before each element of a sequence.
remove_prefix<Seq, TC = listify, FC = TC>Remove the first elements corresponding to a prefix.
f<xs...>= decltype(impl(static_cast<list<xs...>*>(nullptr)))
remove_suffix<Seq, TC = listify, FC = TC>Remove the last elements corresponding to a suffix.
remove_suffix<list<Ts...>, TC, FC>::f<xs...>= conditional_c</*...*/>::f<take_front_c<static_cast<unsigned>(sizeof...(xs) - sizeof...(Ts)), TC>, FC>::f<xs...>
repeat_c<unsigned N, C = listify>::f<xs...>Returns a sequence that contains a number of copies of the same sequence.
repeat<N, C = listify>= repeat_c<N::value, C>
replace_if<Pred, T, C = listify>Replaces every occurrence that satisfy a predicate by some value.
replace<T, U, C = listify>Replaces every occurrence of a value by another value.
reverse<C = listify>::f<xs...>Reverses the order of the elements of a sequence.
rotate_c<int_ N, C = listify>::f<xs...>Rotates the elements of a sequence around a pivot.
rotate<N, C = listify>= rotate_c<N::value, C>
same<C = identity>::f<xs...>Checks whether all values are identical.
same_v<C = identity>::f<xs...>= C::f<emp::same_xs_v<xs...>>
scan<F, C = listify>::f<xs...>Fold a sequence to the left and return a list containing the successive reduction states.
scan_right<F, C = listify>Fold a sequence to the right and return a list containing the successive reduction states.
similar<C = identity>::f<xs...>Checks whether all types are the same or instantiations of the same class template.
similar_v<C = identity>::f<xs...>= C::f<emp::similar_xs_v<xs...>>
sort<Cmp = less<>, C = listify>::f<xs...>Sorts the elements of a sequence according to an ordering relation.
stable_sort<Cmp = less<>, C = listify>= sort<Cmp, C>
starts_with<Seq, C = identity>Checks if the sequence begins with the given prefix.
starts_with<list<Ts...>, C>
f<xs...>= C::f<decltype(impl(static_cast<list<xs...>*>(nullptr)))>
suffix<x, C = listify>::f<xs...>Inserts a value after each element of a sequence.
transform<F, C = listify>::f<xs...>Executes F on every element of a sequence.
transform_first<F, C = listify>Replace the first element of the sequence.
transform_second<F, C = listify>Replace the second element of the sequence.
transform_third<F, C = listify>Replace the third element of the sequence.
unique<C = listify>Returns a list with duplicate elements removed.
unique_if<Cmp = same<>, C = listify>Returns a list with duplicate elements removed.

Group: filter

compress_c_with<C, bool... selectors>::f<xs...>Removes elements that have a corresponding element in selectors to 0.
compress_c<bool... selectors>= compress_c_with<listify, selectors...>
compress_for<Selectors...>= compress_c_with<listify, Selectors::value...>
compress<Selectors, C = listify>
copy_if<Pred, C = listify>Copies all elements that satisfy a predicate.
copy<x, C = listify>Copies all occurence of a value.
remove_adjacent_if<BinaryPred, C = listify>Removes each element in a sequence which respect a predicate with privious element.
remove_adjacent<C = listify>Removes each element in a sequence which is the same type as the privious element.
remove_if<Pred, C = listify>Removes all elements that satisfy a predicate.
remove<T, C = listify>Removes all occurence of a value.
remove_unique<C = listify>::f<xs...>Remove unique elements from a sequence.
remove_unique_if<Cmp = same<>, C = listify>Remove unique elements from a sequence.
copy_unique<C = listify>::f<xs...>Copy unique elements from a sequence.
copy_unique_if<Cmp = same<>, C = listify>Copy unique elements from a sequence.

Group: functional

apply_or_identity<Pred, TC>Return \p TC::f<x> if \p Pred::f<x>, otherwise returns \p x.
bind_back<F, BoundArgs...>::f<xs...>Invoking F with its last parameters bound to bound to args.
bind_back_c<F, int_... BoundArgs>= bind_back<F, number<BoundArgs>...>
bind_back_v<F, auto... BoundArgs>::f<xs...>= JLN_MP_CALLER_XS(xs, F)::f<xs..., BoundArgs...>
bind_front<F, BoundArgs...>::f<xs...>Invoking F with its first parameters bound to bound to args.
bind_front_c<F, int_... BoundArgs>= bind_front<F, number<BoundArgs>...>
bind_front_v<F, auto... BoundArgs>::f<xs...>= JLN_MP_CALLER_XS(xs, F)::f<BoundArgs..., xs...>
call<C, xs...>= C::f<xs...>
call_c<C, auto /*or int_*/... xs>
call_t<C, xs...>= call<C, xs...>::type
capture_back<BoundArgs...>::f<F, xs...>Invoking F with its last parameters bound to args.
capture_back_c<int_... BoundArgs>= capture_back<number<BoundArgs>...>
capture_back_v<auto... BoundArgs>::f<F, xs...>= F::f<xs..., BoundArgs...>
capture_front<BoundArgs...>::f<F, xs...>Invoking F with its first parameters bound to args.
capture_front_c<int_... BoundArgs>= capture_front<number<BoundArgs>...>
capture_front_v<auto... BoundArgs>::f<F, xs...>= F::f<BoundArgs..., xs...>
cascade<F, Fs...>Recursively invokes functions to nested typelist of typelists.
compose_f<template<class...> F, template<class...> Fs...>Composition of two meta-functions or more.
compose<F, Fs...>Composition of two functions or more.
default_make_id_tag\endcond
next_idGenerates a unique id per call for a specified tag.
id_of<T>::valueGenerates a unique id per type.
id_of_v<T>= id_of<T>::value
id_of_t<T>= number<id_of<T>::value>
tagged_id_of<Tag, T>::valueGenerates a unique id per type for a specified tag.
tagged_id_of_v<Tag, T>= tagged_id_of<Tag, T>::value
tagged_id_of_t<Tag, T>= number<tagged_id_of<Tag, T>::value>
make_id_for<Tag, C = identity>::f<T>Generates a unique id per type.
make_id<C = identity>= make_id_for<default_make_id_tag, C>
each<Fs..., C>::f<xs...>Invokes multiple functions each taking the parameter corresponding to its position.
eval<auto F, C = identity>::f<xs...>Invokes a lambda function.
fix<C>::f<xs...>Invokes a function computing the fixed point of a function.
flip<C = listify>::f<x0, x1, xs...>Invokes a function with its two first arguments reversed.
identity::f<x>= x
if_<Pred, TC, FC = always<false_>>::f<xs...>A conditional expression.
invoke_twice<F>::f<xs...>Invokes twice.
is_na= is<na>
violation= always<na>
try_<F, TC = identity, FC = violation>::f<xs...>Invokes TC::f<result> whether FC::f<xs...> is a valid expression other than na, otherwhise invokes FC::f<xs...>.
try_or_else<F, FC = violation>= try_<F, identity, FC>
try_or<F, FT = na>= try_<F, identity, always<FT>>
is_invocable<F, C = identity>Checks whether F::f<xs...> is invocable.
is_not_invocable<F, C = identity>Checks whether F::f<xs...> is not invocable.
lift_t<template<class...> F, C = identity>::f<xs...>Makes a function from a lazy meta-function.
lift<template<class...> F, C = identity>::f<xs...>Makes a function from a meta-function.
lift_v_t<template<auto /*or int_*/...> F, C = identity>::f<xs...>Makes a function from a lazy meta-function.
lift_v<template<auto /*or int_*/...> F, C = identity>::f<xs...>Makes a function from a meta-function.
monadic<TC, FC = violation>Invokes FC whether na, otherwise TC.
monadic0<TC, FC = violation>Invokes FC whether first value is na, otherwise TC.
monadic_xs<TC, FC = violation>Invokes FC whether any value is na, otherwise TC.
monadic_if_na<x, template<class...> M, TC, FC = violation>Monadify only if x is na.
naValue that is not available.
memoize_call<C, xs...>Memoization version of call.
memoize<C>::f<xs...>Memoize a call to C::f<xs...>.
next_randomGenerates a unique id per call for a specified tag.
random<C = identity, auto = []{}>::f<xs...>Generate a random number.
not_fn<F, C = identity>Returns the negation of F.
partial<Fs..., C>::f<xs...>Invokes multiple functions each taking the parameter corresponding to its position (or without parameter whether it does not exist), then calls C with the results and the rest of the parameters.
partial_each<Fs..., C>::f<xs...>Invokes multiple functions each taking the parameter corresponding to its position, then calls C with the results and the rest of the parameters.
partial_tee<Fs..., C>::f<xs...>Invokes multiple functions passing all parameters to each then calls C with the results and the rest of the parameters.
partial_xs<Fs..., C>::f<xs...>Invokes multiple functions passing all parameters to each (or without parameter whether it does not exist), then calls C with the results and the rest of the parameters.
stop_recursion::f<_...>Stop the recursion, the input values will be used as result.
recursion_result::f<xs...>Specify result values and stop recursion.
next_recursion::f<xs...>Specify values for the next iteration.
recursively<F, C = identity>::f<xs...>Recursively invokes F until stop_recursion or recursion_result.
recursively_xs<F, C = listify>Same than recursively, but with listify as default continuation.
recursively_as_much_as_possible<F, C = identity>::f<xs...>Recursively invokes F until the result is stop_recursion, recursion_result or no longer changes.
recursively_as_much_as_possible_xs<F, C = listify>Same than recursively_as_much_as_possible, but with listify as default continuation.
tee<Fs..., C>::f<xs...>Invokes multiple functions passing all parameters to each.
until<Pred, F, C = identity>Apply a function until some predicate is satisfied.
until_xs<Pred, F, C = listify>Apply a function until some predicate is satisfied.
until_last<Searcher>Uses a Searcher in a loop until the last result.
until_last_t<template<class...> Tpl, Pred, TC = listify, FC = clear<TC>>= Tpl<Pred, recursively<pop_front<Tpl<Pred, next_recursion, stop_recursion>>, TC>, FC>
partial_until_last_t<template<class...> Tpl, OffsetEnd, Pred, TC = listify, FC = clear<TC>>= Tpl<OffsetEnd, Pred, recursively<pop_front<Tpl<OffsetEnd, Pred, next_recursion, stop_recursion>>, TC>, FC>
partial_until_last_t_c<template<int_, class...> Tpl, int_ OffsetEnd, Pred, TC = listify, FC = clear<TC>>= Tpl<OffsetEnd, Pred, recursively<pop_front<Tpl<OffsetEnd, Pred, next_recursion, stop_recursion>>, TC>, FC>
while_<Pred, F, C = identity>Apply a function while some predicate is satisfied.
while_xs<Pred, F, C = listify>Apply a function while some predicate is satisfied.

Group: group

batched_with_c<int_ size, F = listify, C = listify>Splits a sequence by arbitrary size group.
batched_c<int_ size, C = listify>= strided_sliding_with_c<size, size, listify, C>
batched_with<size, F = listify, C = listify>= strided_sliding_with_c<size::value, size::value, F, C>
batched<size, C = listify>= strided_sliding_with_c<size::value, size::value, listify, C>
collapse2_with<C, F, keys...>::f<xs...>Groups adjacent elements by adjacent keys.
collapse2_with_c<C, F, int_... keys>= collapse2_with<C, F, number<keys>...>
collapse2_c<C, int_... keys>= collapse2_with<C, listify, number<keys>...>
collapse2<C, keys...>= collapse2_with<C, listify, keys...>
collapse_with<keys, F = listify, C = listify>
collapse<keys, C = listify>
collapse_for<keys...>= collapse2_with<listify, listify, keys...>
collapse_for_c<int_... keys>= collapse2_with<listify, listify, number<keys>...>
combine<C = listify>::f<xs...>Computes all possible combinations (with repetition) from the elements in a sequence.
group_by_with<Cmp, F = listify, C = listify>::f<xs...>Groups adjacent elements that respect a predicate.
group_with<F = listify, C = listify>= group_by_with<same<>, F, C>
group_by<Cmp, C = listify>= group_by_with<Cmp, listify, C>
group<C = listify>= group_by_with<same<>, listify, C>
left_matrix_longest_with<FillValue, F = listify, C = listify>::f<seqs...>Fills a sequence of typelist to the longest size.
left_matrix_longest<FillValue, C = listify>= left_matrix_longest_with<FillValue, listify, C>
right_matrix_longest_with<FillValue, F = listify, C = listify>::f<seqs...>Fills a sequence of typelist to the longest size.
right_matrix_longest<FillValue, C = listify>= right_matrix_longest_with<FillValue, listify, C>
left_matrix_shortest_with<F = listify, C = listify>::f<seqs...>Truncates a sequence of typelist to the smallest size.
left_matrix_shortest<C = listify>= left_matrix_shortest_with<listify, C>
right_matrix_shortest_with<F = listify, C = listify>::f<seqs...>Truncates a sequence of typelist to the smallest size.
right_matrix_shortest<C = listify>= right_matrix_shortest_with<listify, C>
pairwise_with<F = listify, C = listify>::f<xs...>Returns successive overlapping pairs.
pairwise<C = listify>= pairwise_with<listify, C>
partition_with<Pred, F = listify, C = listify>::f<xs...>Splits a list in two according to a predicate.
partition<Pred, C = listify>Splits a list in two according to a predicate.
permutations<C = listify>::f<xs...>Generates all permutations of sequence.
powerset<C = listify>::f<xs...>Computes the powerset of a sequence.
product<C = listify>::f<seq = list<>, seqs...>Computes the cartesian product of lists.
regroup_with<F, C = listify>Group identical type together.
regroup<C = listify>= regroup_with<listify, C>
regroup_by_with<Cmp = same<>, F = listify, C = listify>::f<xs...>= unique_if<Cmp, lift</*...*/>>::f<xs...>::f<C, F, Cmp, xs...>
regroup_by<Cmp = same<>, C = listify>= regroup_by_with<Cmp, listify, C>
split_after_if_with<Pred, F = listify, C = listify>::f<xs...>Splits a sequence into multiple lists at every point that satisfy a predicate.
split_after_if<Pred = identity, C = listify>= split_after_if_with<Pred, listify, C>
split_after_with<x, F = listify, C = listify>= split_after_if_with<is<x>, F, C>
split_after<x, C = listify>= split_after_if_with<is<x>, listify, C>
split_at2_with_c<unsigned i, SubC1 = listify, SubC2 = SubC1, C = listify>::f<xs...>Splits a sequence at an arbitrary position.
split_at2_with<i, SubC1 = listify, SubC2 = SubC1, C = listify>= split_at2_with_c<i::value, SubC1, SubC2, C>
split_at_with_c<unsigned i, F = listify, C = listify>= split_at2_with_c<i, F, F, C>
split_at_with<i, F = listify, C = listify>= split_at2_with_c<i::value, F, F, C>
split_at_c<unsigned i, C = listify>Splits a sequence at an arbitrary position.
split_at<i, C = listify>= split_at2_with_c<i::value, listify, listify, C>
split_before_if_with<Pred, F = listify, C = listify>::f<xs...>Splits a sequence into multiple lists at every point that satisfy a predicate.
split_before_if<Pred = identity, C = listify>= split_before_if_with<Pred, listify, C>
split_before_with<x, F = listify, C = listify>= split_before_if_with<is<x>, F, C>
split_before<x, C = listify>= split_before_if_with<is<x>, listify, C>
split_from2<GetIndex, SubC1 = listify, SubC2 = SubC1, C = listify>::f<xs...>Splits a sequence at an arbitrary position returns by GetIndex.
split_from<GetIndex, C = listify>= split_from2<GetIndex, listify, listify, C>
split_if_with<Pred = identity, F = listify, C = listify>::f<xs...>Splits a sequence into multiple lists at every point that satisfy a predicate.
split_if<Pred = identity, C = listify>= split_if_with<Pred, listify, C>
split_with<x, F = listify, C = listify>= split_if_with<is<x>, F, C>
split<x, C = listify>= split_if_with<is<x>, listify, C>
split_keep_separator_if_with<Pred = identity, F = listify, C = listify>::f<xs...>Splits a sequence into multiple lists at every point that satisfy a predicate.
split_keep_separator_if<Pred = identity, C = listify>= split_keep_separator_if_with<Pred, listify, C>
split_keep_separator_with<x, F = listify, C = listify>= split_keep_separator_if_with<is<x>, F, C>
split_keep_separator<x, C = listify>= split_keep_separator_if_with<is<x>, listify, C>
split_once_if<Pred, TC = listify, FC = clear<>>::f<xs...>Splits a sequence at the first position that satisfy a predicate.
split_once<x, TC = listify, FC = clear<>>= split_once_if<is<x>, TC, FC>
zip_longest<FillValue, C = listify>Turns rows into columns, and columns into rows.
zip_longest_with<FillValue, F = listify, C = listify>= right_matrix_longest<FillValue, zip_with<F, C>>
zip_with<F = listify, C = listify>::f<seqs...>Turns rows into columns, and columns into rows.
zip<C = listify>= zip_with<listify, C>

Group: list

append<L, C = listify>Inserts elements at the end of L list.
as_list<C = identity>::f<seq>Extracts type paramaters of a template class or union, then constructs a list.
at<N, C = identity>Retrieves an element of a sequence at an arbitrary position.
at_c<unsigned n, C = identity>= drop_front_c<n, front<C>>
at0<C = identity>= front<C>
at1<C = identity>= drop_front_c<1, front<C>>
at2<C = identity>= drop_front_c<2, front<C>>
at3<C = identity>= drop_front_c<3, front<C>>
at4<C = identity>= drop_front_c<4, front<C>>
at5<C = identity>= drop_front_c<5, front<C>>
at6<C = identity>= drop_front_c<6, front<C>>
at7<C = identity>= drop_front_c<7, front<C>>
at8<C = identity>= drop_front_c<8, front<C>>
at9<C = identity>= drop_front_c<9, front<C>>
back<C = identity>Retrieves the last element of a sequence.
build_indexed_v<xs...>::f<int i>Constructs an indexable sequence in O(1).
build_indexed<xs...>::f<i>Constructs an indexable sequence in O(1).
clear<C = listify>::f<xs...>Removes all elements from the sequence.
drop_back_c<unsigned N, C = listify>::f<xs...>Removes N elements from the end of a sequence.
drop_back_max_c<unsigned N, C = listify>::f<xs...>Removes at most N elements from the end of a sequence.
drop_back<N, C = listify>= drop_back_c<N::value, C>
drop_back_max<N, C = listify>= drop_back_max_c<N::value, C>
drop_front_c<unsigned N, C = listify>::f<xs...>Removes N elements from the beginning of a sequence.
drop_front_max_c<unsigned N, C = listify>::f<xs...>Removes at most N elements from the beginning of a sequence.
drop_front<N, C = listify>= drop_front_c<N::value, C>
drop_front_max<N, C = listify>= drop_front_max_c<N::value, C>
enumerate_v_with<F, C = listify>::f<xs...>Returns pairs containing a numeric index of type int_ and a value.
enumerate_with<F = listify, C = listify>::f<xs...>Returns pairs containing an index and a value.
enumerate<C = listify>= enumerate_with<listify, C>
erase_c<int_ start, unsigned size = 1, C = listify>::f<xs...>Removes at most size elements from index start.
erase<start, size = number<1>, C = listify>= erase_c<start::value, size::value, C>
front<C = identity>::f<x, xs...>Retrieves the first element of a sequence.
insert_c<int_ index, x, C = listify>Inserts an elements at an arbitrary position.
insert<index, x, C = listify>= insert_sequence_c<index::value, list<x>, C>
insert_sequence_c<int_ index, seq, C = listify>Inserts all elements of seq at an arbitrary position.
insert_sequence_c<index, List<xs...>, C>::f<ys...>
insert_sequence<index, seq, C = listify>= insert_sequence_c<index::value, seq, C>
is_empty<C = identity>Checks whether a sequence has no elements.
is_list<C = identity>::f<x>Checks whether x is a list.
is_not_empty<C = identity>Checks whether a sequence has elements.
is_size_of<N, C = identity>= size<is<N, C>>
is_size_of_c<int_ n, C = identity>= size<is<number<n>, C>>
join<C = listify>::f<seqs...>Concatenates lists.
list<xs...>
listify= lift<list>
offset_c<int_ I, C = identity>::f<xs...>Difference between the number of parameter xs and I::value.
offset<I, C = identity>= offset_c<I::value, C>
pop_back<C = listify>Removes the last element of sequence.
pop_front<C = listify>Remove the first element of sequence
prepend<L, C = listify>Inserts elements at the start of L list.
push_back<x, C = listify>::f<xs...>Appends x to the end of the sequence.
push_front<x, C = listify>::f<xs...>Appends x to the beginning of the sequence.
range_c<int_ beg, int_ end, C = listify>::f<xs...>Returns a contiguous subsequence of a sequence.
range<beg, end, C = listify>= range_c<beg::value, end::value, C>
size<C = identity>::f<xs...>Returns the number of elements in a xs.
strided_slice_c<int_ start, unsigned count, unsigned step = 1, C = listify>::f<xs...>Returns a subset of elements in a xs picked at regular intervals in range.
strided_slice<start, count, step = number<1>, C = listify>= strided_slice_c<start::value, count::value, step::value, C>
slice_c<int_ start, unsigned count, C = listify>= strided_slice_c<start, count, 1, C>
slice<start, count, C = listify>= strided_slice_c<start::value, count::value, 1, C>
strided_sliding_with_c<int_ size, int_ stride = 1, F = listify, C = listify>Returns sliding windows of width size.
strided_sliding_with<size, stride = number<1>, F = listify, C = listify>= strided_sliding_with_c<size::value, stride::value, F, C>
strided_sliding<size, stride = number<1>, C = listify>= strided_sliding_with_c<size::value, stride::value, listify, C>
strided_sliding_c<int_ size, int_ stride = 1, C = listify>= strided_sliding_with_c<size, stride, listify, C>
sliding_with<size, F = listify, C = listify>= strided_sliding_with_c<size::value, 1, F, C>
sliding_with_c<int_ size, F = listify, C = listify>= strided_sliding_with_c<size, 1, F, C>
sliding<size, C = listify>= strided_sliding_with_c<size::value, 1, listify, C>
sliding_c<int_ size, C = listify>= strided_sliding_with_c<size, 1, listify, C>
swap_index_c<unsigned i, unsigned j, C = listify>Swap elements at indexes i and j of a sequence.
swap_index<I, J, C = listify>= swap_index_c<I::value, J::value, C>
take_back_c<unsigned N, C = listify>::f<xs...>Extracts N elements from the end of a sequence.
take_back_max_c<unsigned N, C = listify>::f<xs...>Extracts at most N elements from the end of a sequence.
take_back<N, C = listify>= take_back_c<N::value, C>
take_back_max<N, C = listify>= take_back_max_c<N::value, C>
take_front_c<unsigned N, C = listify>::f<xs...>Extracts N elements from the beginning of a sequence.
take_front_max_c<unsigned N, C = listify>::f<xs...>Extracts at most N elements from the beginning of a sequence.
take_front<N, C = listify>= take_front_c<N::value, C>
take_front_max<N, C = listify>= take_front_max_c<N::value, C>
wrap_in_list_if<Pred>Returns a list with the first element if the predicate is checked, otherwise returns a empty list.
wrap_in_list_if_not<Pred>Returns a list with the first element if the predicate is not checked, otherwise returns a empty list.
wrap_in_list_c<bool b>
wrap_in_list_c<true>::f<xs...>= list<xs...>
wrap_in_list_c<false>::f<xs...>= list<>
wrap_in_list<b>= wrap_in_list_c<b::value>

Group: map

is_map<C = identity>Checks whether xs is a map.
map_contains<key, C = identity>Checks if a key exists in a map.
map_not_contains<key, C = identity>Checks if a key does not exists in a map.
map_erase<Key, C = listify>If the map contains an element with a key Key, removes it.
map_find<key, TC = identity, FC = always<na>>::f<kvs...>Finds the element of the map with a key key.
map_find_or_else<key, FC>= map_find<key, identity, FC>
map_find_or<key, FT>= map_find<key, identity, always<FT>>
map_insert<KV, C = listify>Inserts the element KV into the map, if the key emp::front<KV> does not exist.
map_keys<C = listify>Returns a list of the keys of map.
map_keys_with<F = mp::identity, C = listify>Returns a list of the keys of map transformed with F.
map_replace<KV, C = listify>If the map contain the key emp::front<KV>, replaces the existing element with KV.
map_replace_or_insert<KV, C = listify>If the map contain the key emp::front<KV>, replaces the existing element with KV; otherwise, inserts it using push_back<KV>.
map_update<Key, F, C = listify>If the map contain the key Key, replaces the existing element L<k, v...> with F<k, v...>.
map_element_value_update<F>::f<x>Update an element L<k, v...> with L<k, F<k, v...>>.
map_element_key_update<F>::f<x>Update an element L<k, v...> with L<F<k, v...>, v...>.
map_update_key<Key, F, C = listify>If the map contain the key Key, replaces the existing element L<k, v...> with L<F<k, v...>, v...>.
map_update_value<Key, F, C = listify>If the map contain the key Key, replaces the existing element L<k, v...> with L<k, F<k, v...>>.
map_update_or_insert<KV, F, C = listify>If the map contain a key emp::front<KV>, replaces the existing element L<k, v...> with F<k, v...>; otherwise, inserts it using push_back<KV>.
map_update_value_or_insert<KV, F, C = listify>If the map contain a key emp::front<KV>, replaces the existing element L<k, v...> with L<k, F<k, v...>>; otherwise, inserts it using push_back<KV>.

Group: number

as_bool<C = identity>::f<x>Convertion without narrowing from value to true_ / false_.
as_number<C = identity>::f<x>Convertion without narrowing from value to number.
indices<C = listify>Replaces each element of a sequence by its corresponding index.
int_= std::intmax_t
uint_= std::uintmax_t
number<int_ v>::value= v
true_= number<1>
false_= number<0>
iota_v<C = numbers<>>::f<start, count, stride = number<1>>Generates a sequence of int_.
iota<C = listify>Generates a sequence of number.
is_number<C = identity>::f<x>Checks whether a value is a number.
make_int_sequence_v<C = numbers<>>::f<n>Generates an incremental sequence of n int_.
make_int_sequence<C = mp::listify>= make_int_sequence_v<mp::numbers<C>>
int_seq_c<int_... i>single list of int_
min<Cmp = less<>, C = identity>= fold<if_<flip<Cmp>, at1<>, at0<>>, C>
min0<Cmp = less<>, C = identity>= if_<size<>, min<Cmp, C>, always<number<0>, C>>
max<Cmp = less<>, C = identity>= fold<if_<Cmp, at1<>, at0<>>, C>
max0<Cmp = less<>, C = identity>= if_<size<>, max<Cmp, C>, always<number<0>, C>>
clamp<Min, Max, Cmp = less<>, C = identity>= if_<push_back<Min, Cmp>, always<Min>, /*...*/>
clamp_c<int_ min, int_ max, Cmp = less<>, C = identity>= clamp<number<min>, number<max>, Cmp, C>
abs<Cmp = less<>, C = identity>= tee<identity, neg<>, if_<Cmp, at1<C>, at0<C>>>
pow<C = identity>::f<base, exponent>= C::f<number</*...*/>>
not_<C = identity>::f<x>= C::f<number<!x::value>>
not_<not_<C>>::f<x>= C::f<number<bool(x::value)>>
numbers<C = listify>::f<int_... ns>= C::f<number<ns>...>
or_<C = identity>::f<xs...>= C::f<number<(xs::value || ... || false)>>
left_or<C = identity>::f<xs...>= C::f<number<(false || ... || xs::value)>>
and_<C = identity>::f<xs...>= C::f<number<(xs::value && ... && true)>>
left_and<C = identity>::f<xs...>= C::f<number<(true && ... && xs::value)>>
add<C = identity>::f<xs...>= C::f<number<(xs::value + ...)>>
add0<C = identity>= if_<size<>, add<C>, always<number<0>, C>>
left_add<C = identity>::f<xs...>= C::f<number<(... + xs::value)>>
left_add0<C = identity>= if_<size<>, left_add<C>, always<number<0>, C>>
sub<C = identity>::f<xs...>= C::f<number<(... - xs::value)>>
sub0<C = identity>= if_<size<>, sub<C>, always<number<0>, C>>
lshift<C = identity>::f<xs...>= C::f<number<(... << xs::value)>>
lshift0<C = identity>= if_<size<>, lshift<C>, always<number<0>, C>>
rshift<C = identity>::f<xs...>= C::f<number<(... >> xs::value)>>
rshift0<C = identity>= if_<size<>, rshift<C>, always<number<0>, C>>
mul<C = identity>::f<xs...>= C::f<number<(xs::value * ...)>>
mul0<C = identity>= if_<size<>, mul<C>, always<number<0>, C>>
mul1<C = identity>= if_<size<>, mul<C>, always<number<1>, C>>
left_mul<C = identity>::f<xs...>= C::f<number<(... * xs::value)>>
left_mul0<C = identity>= if_<size<>, left_mul<C>, always<number<0>, C>>
left_mul1<C = identity>= if_<size<>, left_mul<C>, always<number<1>, C>>
div<C = identity>::f<xs...>= C::f<number<(... / xs::value)>>
div0<C = identity>= if_<size<>, div<C>, always<number<0>, C>>
div1<C = identity>= if_<size<>, div<C>, always<number<1>, C>>
mod<C = identity>::f<xs...>= C::f<number<(... % xs::value)>>
mod0<C = identity>= if_<size<>, mod<C>, always<number<0>, C>>
mod1<C = identity>= if_<size<>, mod<C>, always<number<1>, C>>
xor_<C = identity>::f<xs...>= C::f<number<(xs::value ^ ...)>>
xor0<C = identity>= if_<size<>, xor_<C>, always<number<0>, C>>
left_xor<C = identity>::f<xs...>= C::f<number<(... ^ xs::value)>>
left_xor0<C = identity>= if_<size<>, left_xor<C>, always<number<0>, C>>
bit_and<C = identity>::f<xs...>= C::f<number<(xs::value & ...)>>
bit_and0<C = identity>= if_<size<>, bit_and<C>, always<number<0>, C>>
left_bit_and<C = identity>::f<xs...>= C::f<number<(... & xs::value)>>
left_bit_and0<C = identity>= if_<size<>, left_bit_and<C>, always<number<0>, C>>
bit_or<C = identity>::f<xs...>= C::f<number<(xs::value | ...)>>
bit_or0<C = identity>= if_<size<>, bit_or<C>, always<number<0>, C>>
left_bit_or<C = identity>::f<xs...>= C::f<number<(... | xs::value)>>
left_bit_or0<C = identity>= if_<size<>, left_bit_or<C>, always<number<0>, C>>
neg<C = identity>::f<x>= C::f<number<(-x::value)>>
unary_plus<C = identity>::f<x>= C::f<number<(+x::value)>>
bit_not<C = identity>::f<x>= C::f<number<(~x::value)>>
inc<C = identity>::f<x>= C::f<number<(x::value+1)>>
dec<C = identity>::f<x>= C::f<number<(x::value-1)>>
equal<C = identity>::f<x, y>= C::f<number<(x::value == y::value)>>
not_equal<C = identity>::f<x, y>= C::f<number<(x::value != y::value)>>
less<C = identity>::f<x, y>= C::f<number<(x::value < y::value)>>
less_equal<C = identity>::f<x, y>= C::f<number<(x::value <= y::value)>>
greater<C = identity>::f<x, y>= C::f<number<(x::value > y::value)>>
greater_equal<C = identity>::f<x, y>= C::f<number<(x::value >= y::value)>>
equal_to<N, C = identity>= push_front<N, equal<C>>
not_equal_to<N, C = identity>= push_front<N, not_equal<C>>
less_than<N, C = identity>= push_back<N, less<C>>
less_equal_than<N, C = identity>= push_back<N, less_equal<C>>
greater_than<N, C = identity>= push_back<N, greater<C>>
greater_equal_than<N, C = identity>= push_back<N, greater_equal<C>>
equal_to_c<int_ n, C = identity>= equal_to<number<n>, C>
not_equal_to_c<int_ n, C = identity>= not_equal_to<number<n>, C>
less_than_c<int_ n, C = identity>= less_than<number<n>, C>
less_equal_than_c<int_ n, C = identity>= less_equal_than<number<n>, C>
greater_than_c<int_ n, C = identity>= greater_than<number<n>, C>
greater_equal_than_c<int_ n, C = identity>= greater_equal_than<number<n>, C>
to_bool<C = identity>::f<x>Converts a value to a true_ / false_.

Group: reduce

fold<F, C = identity>::f<xs...>Folds left over a list using a binary predicate.
fold_right<F, C = identity>::f<xs...>Folds right over a list using a binary predicate.
fold_tree<F, C = identity>::f<xs...>Folds tree over a list using a binary predicate.
fold_balanced_tree<F, C = identity>::f<xs...>Folds tree over a list using a binary predicate.
partial_fold_xs_c<int_ OffsetEnd, F, C = identity>::f<xs...>As fold_xs, but stop at position OffsetEnd.
partial_fold_xs<OffsetEnd, F, C = identity>= partial_fold_xs_c<OffsetEnd::value, F, C>
fold_xs<F, C = identity>Folds left over a list using a mulary predicate.
reverse_fold<F, C = identity>::f<xs...>Folds right over a list using a binary predicate.
reverse_fold_right<F, C = identity>::f<xs...>Folds right over a list using a binary predicate.
after<Seq, TC = listify, FC = clear<TC>>Find the sequence after a sub-sequence.
after<list<Ts...>, TC, FC>
before<Seq, TC = listify, FC = clear<TC>>Find the sequence before a sub-sequence.
before<list<Ts...>, TC, FC>::f<xs...>
before_after_with<Seq, SubC1 = listify, SubC2 = SubC1, TC = listify, FC = clear<TC>>Find the sequences before and after a sub-sequence.
before_after<Seq, TC = listify, FC = clear<TC>>= before_after_with<Seq, listify, listify, TC, FC>
before_after_with<list<Ts...>, SubC1, SubC2, TC, FC>::f<xs...>
conjunction_with<Pred, C = identity>::f<xs...>Perform a logical AND on the sequence of value and returns the first value converted to false.
conjunction<C = identity>Perform a logical AND on the sequence of value and returns the first value converted to false.
disjunction_with<Pred, C = identity>::f<xs...>Perform a logical OR on the sequence of value and returns the first value converted to true.
disjunction<C = identity>Perform a logical OR on the sequence of value and returns the first value converted to true.
drop_until<Pred, TC = listify, FC = clear<TC>>::f<xs...>Remove the first elements of a sequence that does not satisfy a predicate.
drop_until_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>Remove the first minus at most ExtendedByN elements of a sequence that does not satisfy a predicate.
drop_until_extended_by_n<ExtendedByN, Pred, TC = listify, FC = clear<TC>>= drop_until_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>
drop_inclusive_until<Pred, TC = listify, FC = clear<TC>>= drop_until_extended_by_n_c<1, Pred, TC, FC>
drop_until_xs<Pred, TC = listify, FC = clear<TC>>::f<xs...>Remove the first elements of a sequence that does not satisfy a predicate.
drop_until_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>Same as drop_until_extended_by_n_c, but for drop_until_xs.
drop_until_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = clear<TC>>= drop_until_extended_by_n_xs_c<ExtendedByN::value, Pred, TC, FC>
drop_inclusive_until_xs<Pred, TC = listify, FC = clear<TC>>= drop_until_extended_by_n_xs_c<1, Pred, TC, FC>
partial_drop_until_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>Same as drop_until_extended_by_n_xs_c, but stop searching at position OffsetEnd.
partial_drop_until_xs<OffsetEnd, Pred, TC = listify, FC = clear<TC>>= partial_drop_until_extended_by_n_xs_c<OffsetEnd::value, 0, Pred, TC, FC>
partial_drop_until_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = clear<TC>>= partial_drop_until_extended_by_n_xs_c<OffsetEnd, 0, Pred, TC, FC>
partial_drop_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = clear<TC>>= partial_drop_until_extended_by_n_xs_c<OffsetEnd::value, ExtendedByN::value, Pred, TC, FC>
partial_drop_inclusive_until_xs_c<std::size_t OffsetEnd, Pred, TC = listify, FC = clear<TC>>= partial_drop_until_extended_by_n_xs_c<OffsetEnd, 1, Pred, TC, FC>
partial_drop_inclusive_until_xs<OffsetEnd, Pred, TC = listify, FC = clear<TC>>= partial_drop_until_extended_by_n_xs_c<OffsetEnd::value, 1, Pred, TC, FC>
drop_while<Pred, TC = listify, FC = clear<TC>>::f<xs...>Remove the first elements of a sequence that satisfy a predicate.
drop_while_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>Remove the first minus at most ExtendedByN elements of a sequence that satisfy a predicate.
drop_while_extended_by_n<ExtendedByN, Pred, TC = listify, FC = clear<TC>>= drop_while_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>
drop_inclusive_while<Pred, TC = listify, FC = clear<TC>>= drop_while_extended_by_n_c<1, Pred, TC, FC>
drop_while_xs<Pred, TC = listify, FC = clear<TC>>::f<xs...>Remove the first elements of a sequence that satisfy a predicate.
drop_while_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>Same as drop_while_extended_by_n_c, but for drop_while_xs.
drop_while_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = clear<TC>>= drop_while_extended_by_n_xs_c<ExtendedByN::value, Pred, TC, FC>
drop_inclusive_while_xs<Pred, TC = listify, FC = clear<TC>>= drop_while_extended_by_n_xs_c<1, Pred, TC, FC>
partial_drop_while_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>Same as drop_while_extended_by_n_xs_c, but stop searching at position OffsetEnd.
partial_drop_while_xs<OffsetEnd, Pred, TC = listify, FC = clear<TC>>= partial_drop_while_extended_by_n_xs_c<OffsetEnd::value, 0, Pred, TC, FC>
partial_drop_while_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = clear<TC>>= partial_drop_while_extended_by_n_xs_c<OffsetEnd, 0, Pred, TC, FC>
partial_drop_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = clear<TC>>= partial_drop_while_extended_by_n_xs_c<OffsetEnd::value, ExtendedByN::value, Pred, TC, FC>
partial_drop_inclusive_while_xs_c<std::size_t OffsetEnd, Pred, TC = listify, FC = clear<TC>>= partial_drop_while_extended_by_n_xs_c<OffsetEnd, 1, Pred, TC, FC>
partial_drop_inclusive_while_xs<OffsetEnd, Pred, TC = listify, FC = clear<TC>>= partial_drop_while_extended_by_n_xs_c<OffsetEnd::value, 1, Pred, TC, FC>
find_if<Pred, TC = listify, FC = clear<TC>>Finds the first element that satisfy a predicate.
find_if_not<Pred, TC = listify, FC = clear<TC>>= drop_while<Pred, TC, FC>
find<T, TC = listify, FC = clear<TC>>= find_if<is<T>, TC, FC>
find_last_if<Pred, TC = listify, FC = clear<TC>>Finds the last element that satisfy a predicate.
find_last_if_not<Pred, TC = listify, FC = clear<TC>>= until_last_t<drop_while, Pred, TC, FC>
find_last<T, TC = listify, FC = clear<TC>>= find_last_if<is<T>, TC, FC>
index_if<Pred, TC = identity, FC = size<>>::f<xs...>Finds the index of the first element of sequence that satisfies the predicate Pred.
index_of<T, TC = identity, FC = size<>>Finds the index of the first element of sequence that is a type T.
index_if_xs<Pred, TC = identity, FC = size<>>::f<xs...>Search the index of first sub-sequence that satisfy a predicate.
partial_index_if_xs_c<int_ OffsetEnd, Pred, TC = identity, FC = size<>>::f<xs...>Same as index_if_xs, but stop searching at position OffsetEnd.
partial_index_if_xs<OffsetEnd, Pred, TC = identity, FC = size<>>= partial_index_if_xs_c<OffsetEnd::value, Pred, TC, FC>
lower_bound<x, Cmp = less<>, TC = listify, FC = TC>::f<xs...>Finds first element that is not less than (i.e. greater or equal to) x.
lower_bound_c<int_ x, Cmp = less<>, TC = listify, FC = TC>= lower_bound<number<x>, Cmp, TC, FC>
lower_bound_than<x, TC = listify, FC = TC>= lower_bound<x, less<>, TC, FC>
lower_bound_than_c<int_ x, TC = listify, FC = TC>= lower_bound<number<x>, less<>, TC, FC>
search<Pred, TC = listify, FC = clear<TC>>Search the first sub-sequence that satisfy a predicate.
search_before<Pred, TC = listify, FC = clear<TC>>Search elements before sub-sequence that satisfy a predicate.
search_before_extended_by_n<ExtendedByN, Pred, TC = listify, FC = clear<TC>>Search elements before sub-sequence that satisfy a predicate.
search_before_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>= take_until_extended_by_n_xs_c<ExtendedByN, Pred, TC, FC>
partial_search<StopWhenAtLeast, Pred, TC = listify, FC = clear<TC>>Same search, but it stops when there is StopWhenAtLeast::value element or less.
partial_search_c<std::size_t StopWhenAtLeast, Pred, TC = listify, FC = clear<TC>>= partial_drop_until_xs_c<-int_{StopWhenAtLeast}-1, Pred, TC, FC>
partial_search_before<StopWhenAtLeast, Pred, TC = listify, FC = clear<TC>>Same search_before, but it stops when there is StopWhenAtLeast::value element or less.
partial_search_before_c<std::size_t StopWhenAtLeast, Pred, TC = listify, FC = clear<TC>>= partial_take_until_xs_c<-int_{StopWhenAtLeast}-1, Pred, TC, FC>
partial_search_before_extended_by_n_c<std::size_t StopWhenAtLeast, std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>Same search_before, but it stops when there is StopWhenAtLeast::value element or less.
partial_search_before_extended_by_n<StopWhenAtLeast, ExtendedByN, Pred, TC = listify, FC = clear<TC>>= partial_take_until_extended_by_n_xs_c<-int_{StopWhenAtLeast::value}-1, ExtendedByN::value, Pred, TC, FC>
skip_until<Pred, TC = listify, FC = TC>Remove the first elements of a sequence that does not satisfy a predicate.
skip_inclusive_until<Pred, TC = listify, FC = TC>= drop_inclusive_until<Pred, TC, clear<FC>>
skip_until_extended_by_n<ExtendedByN, Pred, TC = listify, FC = TC>= drop_until_extended_by_n_c<ExtendedByN::value, Pred, TC, clear<FC>>
skip_until_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>= drop_until_extended_by_n_c<ExtendedByN, Pred, TC, clear<FC>>
skip_until_xs<Pred, TC = listify, FC = TC>Remove the first elements of a sequence that does not satisfy a predicate.
partial_skip_until_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>Same as drop_until_xs, but stop searching at position OffsetEnd.
partial_skip_until_xs<OffsetEnd, Pred, TC = listify, FC = TC>= partial_drop_until_xs<OffsetEnd, Pred, TC, clear<FC>>
skip_inclusive_until_xs<Pred, TC = listify, FC = TC>= drop_inclusive_until_xs<Pred, TC, clear<FC>>
partial_skip_inclusive_until_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>= partial_drop_inclusive_until_xs_c<OffsetEnd, Pred, TC, clear<FC>>
partial_skip_inclusive_until_xs<OffsetEnd, Pred, TC = listify, FC = TC>= partial_drop_inclusive_until_xs<OffsetEnd, Pred, TC, clear<FC>>
skip_until_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>= drop_until_extended_by_n_xs_c<ExtendedByN, Pred, TC, clear<FC>>
skip_until_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = TC>= drop_until_extended_by_n_xs<ExtendedByN, Pred, TC, clear<FC>>
partial_skip_until_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC>= partial_drop_until_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>
partial_skip_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC>= partial_drop_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>
skip_while<Pred, TC = listify, FC = TC>Remove the first elements of a sequence that satisfy a predicate.
skip_inclusive_while<Pred, TC = listify, FC = TC>= drop_inclusive_while<Pred, TC, clear<FC>>
skip_while_extended_by_n<ExtendedByN, Pred, TC = listify, FC = TC>= drop_while_extended_by_n_c<ExtendedByN::value, Pred, TC, clear<FC>>
skip_while_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>= drop_while_extended_by_n_c<ExtendedByN, Pred, TC, clear<FC>>
skip_while_xs<Pred, TC = listify, FC = TC>Remove the first elements of a sequence that satisfy a predicate.
partial_skip_while_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>Same as skip_while_xs, but stop searching at position OffsetEnd.
partial_skip_while_xs<OffsetEnd, Pred, TC = listify, FC = TC>= partial_drop_while_xs<OffsetEnd, Pred, TC, clear<FC>>
skip_inclusive_while_xs<Pred, TC = listify, FC = TC>= drop_inclusive_while_xs<Pred, TC, clear<FC>>
partial_skip_inclusive_while_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>= partial_drop_inclusive_while_xs_c<OffsetEnd, Pred, TC, clear<FC>>
partial_skip_inclusive_while_xs<OffsetEnd, Pred, TC = listify, FC = TC>= partial_drop_inclusive_while_xs<OffsetEnd, Pred, TC, clear<FC>>
skip_while_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>= drop_while_extended_by_n_xs_c<ExtendedByN, Pred, TC, clear<FC>>
skip_while_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = TC>= drop_while_extended_by_n_xs<ExtendedByN, Pred, TC, clear<FC>>
partial_skip_while_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC>= partial_drop_while_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>
partial_skip_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC>= partial_drop_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>
take_until<Pred, TC = listify, FC = TC>::f<xs...>Extract the first elements of a sequence that does not satisfy a predicate.
take_until_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>Extract the first plus at most ExtendedByN elements of a sequence that does not satisfy a predicate.
take_until_extended_by_n<ExtendedByN, Pred, TC = listify, FC = TC>= take_until_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>
take_inclusive_until<Pred, TC = listify, FC = TC>= take_until_extended_by_n_c<1, Pred, TC, FC>
take_until_xs<Pred, TC = listify, FC = TC>::f<xs...>Extracts the first elements of a sequence that does not satisfy a predicate.
take_until_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>Same as take_until_extended_by_n_c, but for take_until_xs.
take_until_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = TC>= take_until_extended_by_n_xs_c<ExtendedByN::value, Pred, TC, FC>
take_inclusive_until_xs<Pred, TC = listify, FC = TC>= take_until_extended_by_n_xs_c<1, Pred, TC, FC>
partial_take_until_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>Same as take_until_extended_by_n_xs_c, but stop searching at position OffsetEnd.
partial_take_until_xs<OffsetEnd, Pred, TC = listify, FC = TC>= partial_take_until_extended_by_n_xs_c<OffsetEnd::value, 0, Pred, TC, FC>
partial_take_until_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>= partial_take_until_extended_by_n_xs_c<OffsetEnd, 0, Pred, TC, FC>
partial_take_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC>= partial_take_until_extended_by_n_xs_c<OffsetEnd::value, ExtendedByN::value, Pred, TC, FC>
partial_take_inclusive_until_xs_c<std::size_t OffsetEnd, Pred, TC = listify, FC = TC>= partial_take_until_extended_by_n_xs_c<OffsetEnd, 1, Pred, TC, FC>
partial_take_inclusive_until_xs<OffsetEnd, Pred, TC = listify, FC = TC>= partial_take_until_extended_by_n_xs_c<OffsetEnd::value, 1, Pred, TC, FC>
take_while<Pred, TC = listify, FC = TC>::f<xs...>Extract the first elements of a sequence that satisfy a predicate.
take_while_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>Extract the first plus at most ExtendedByN elements of a sequence that satisfy a predicate.
take_while_extended_by_n<ExtendedByN, Pred, TC = listify, FC = TC>= take_while_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>
take_inclusive_while<Pred, TC = listify, FC = TC>= take_while_extended_by_n_c<1, Pred, TC, FC>
take_while_xs<Pred, TC = listify, FC = TC>::f<xs...>Extracts the first elements of a sequence that satisfy a predicate.
take_while_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>Same as take_while_extended_by_n_c, but for take_while_xs.
take_while_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = TC>= take_while_extended_by_n_xs_c<ExtendedByN::value, Pred, TC, FC>
take_inclusive_while_xs<Pred, TC = listify, FC = TC>= take_while_extended_by_n_xs_c<1, Pred, TC, FC>
partial_take_while_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>Same as take_while_extended_by_n_xs_c, but stop searching at position OffsetEnd.
partial_take_while_xs<OffsetEnd, Pred, TC = listify, FC = TC>= partial_take_while_extended_by_n_xs_c<OffsetEnd::value, 0, Pred, TC, FC>
partial_take_while_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>= partial_take_while_extended_by_n_xs_c<OffsetEnd, 0, Pred, TC, FC>
partial_take_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC>= partial_take_while_extended_by_n_xs_c<OffsetEnd::value, ExtendedByN::value, Pred, TC, FC>
partial_take_inclusive_while_xs_c<std::size_t OffsetEnd, Pred, TC = listify, FC = TC>= partial_take_while_extended_by_n_xs_c<OffsetEnd, 1, Pred, TC, FC>
partial_take_inclusive_while_xs<OffsetEnd, Pred, TC = listify, FC = TC>= partial_take_while_extended_by_n_xs_c<OffsetEnd::value, 1, Pred, TC, FC>
upper_bound<x, Cmp = less<>, TC = listify, FC = TC>Finds first element that is greater that x.
upper_bound_c<int_ x, Cmp = less<>, TC = listify, FC = TC>= upper_bound<number<x>, Cmp, TC, FC>
upper_bound_than<x, TC = listify, FC = TC>= upper_bound<x, less<>, TC, FC>
upper_bound_than_c<int_ x, TC = listify, FC = TC>= upper_bound<number<x>, less<>, TC, FC>

Group: set

set_contains<x, C = identity>::f<xs...>Checks if x is an element of the set whose elements are xs.
set_not_contains<x, C = identity>Checks if x is not an element of the set whose elements are xs.
set_all_contains<x, C = identity>::f<Sets...>Checks if x is an element of all set Sets.
set_any_contains<x, C = identity>::f<Sets...>Checks if x is an element of any set Sets.
set_none_contains<x, C = identity>::f<Sets...>Checks if x is an element of none set Sets.
set_difference<C = listify>::f<L, Sets...>Removes the elements of the list L that appear in any of the sets Sets.
set_find<x, TC = identity, FC = always<na>>::f<xs...>Finds the element x in the set.
set_find_or_else<x, FC>= set_find<x, identity, FC>
set_find_or<x, FT>= set_find<x, identity, always<FT>>
set_intersection<C = listify>::f<L, Sets...>Returns a set that contains the elements that occur in all of the sets Sets.
set_push_back<x, C = listify>::f<xs...>Appends x to the end of the set whose elements are xs if not already in xs.
set_push_back_elements<C = listify>::f<Set, xs...>Appends to the end of the set Set the elements of xs which are not already in Set.
set_push_front<x, C = listify>::f<xs...>Appends x to the beginning of the set whose elements are xs if not already in xs.
set_push_front_elements<C = listify>::f<Set, xs...>Appends to the beginning of the set Set the elements of xs which are not already in Set.
set_union<C = listify>::f<Set, Ls...>Appends to the end of the set Set the elements of Ls which are not already in Set.

Group: trait

alignof_<C = identity>::f<x>Wrapper for alignof keyword
traits::extent<C = identity>::f<x, i>= C::f<std::extent<x, i::value>::type>
traits::emp::extent<x, i = number<0>>= std::extent<x, i::value>::type
traits::is_nothrow_convertible<C = identity>::f<xs...>= C::f<std::bool_constant<std::is_nothrow_convertible_v<xs...>>>
traits::emp::is_nothrow_convertible<xs...>= std::bool_constant<std::is_nothrow_convertible_v<xs...>>
traits::is_nothrow_convertible<identity>::f<xs...>= std::bool_constant<std::is_nothrow_convertible_v<xs...>>
traits::aligned_storage<C = identity>::f<Len, Alignment...>= C::f<std::aligned_storage<Len::value, Alignment::value...>::type>
traits::emp::aligned_storage<Len, Alignment...>= std::aligned_storage<Len::value, Alignment::value...>::type
traits::aligned_union<C = identity>::f<len, xs...>= C::f<std::aligned_union<len::value, xs...>::type>
traits::emp::aligned_union<len, xs...>= std::aligned_union<len::value, xs...>::type
has_type<C = identity>::f<x>Checks whether x has a type member.
has_value_type<C = identity>::f<x>Checks whether x has a type member.
is_specialization_of<template<class...> Tpl, C = identity>::f<x>Checks whether x is Tpl<xs...>
sizeof_<C = identity>::f<x>Wrapper for sizeof keyword
type_<C = identity>::f<x>Function for x::type.
value_type<C = identity>::f<x>Function for x::value_type.
value_type<identity>::f<x>= x::value_type

Group: utility

always<x, C = identity>::f<xs...>Always evaluate at an arbitrary value.
conditional_c<bool>
conditional_c<true>::f<true_value, false_value>= true_value
conditional_c<false>::f<true_value, false_value>= false_value
conditional<bool_>= conditional_c<bool(bool_::value)>
is<T, C = identity>::f<x>= C::f<number<std::is_same_v<T, x>>>
is_not<T, C = identity>= is<T, not_<C>>
iterate_c<uint_ n, F, C = identity>::f<x>Apply a function n times to its argument.
iterate<n, F, C = identity>Apply a function n times to its argument.
rewrap_unpack<C>::f<L, xs...>Rewrap result of unpack<C> in the same type as L.
rewrap_unpack_append<C>::f<L, xs...>Rewrap result of unpack_append<C> in the same type as L.
unpack<C>::f<seq, xs...>Turns a typelist into a sequence of those types.
unpack_append<C>::f<seq, xs...>Turns a typelist into a sequence of those types.
unpack_v<C>::f<seq, xs...>Turns a typelist into a sequence of those types.
unpack_append_v<C>::f<seq, xs...>Turns a typelist into a sequence of those types.

Group: value

as_val<C = identity>::f<x>Converts x to val.
has_value<C = identity>::f<x>Checks whether x has a value member.
is_val<C = identity>::f<x>Checks whether x is a val.
val<auto v>::value= v
typed_value<T, T v>= val<v>
value_from<T>= val<T::value>
val_or<C = identity>::f<xs...>= C::f<val<(xs::value || ... || false)>>
val_left_or<C = identity>::f<xs...>= C::f<val<(false || ... || xs::value)>>
val_and<C = identity>::f<xs...>= C::f<val<(xs::value && ... && true)>>
val_left_and<C = identity>::f<xs...>= C::f<val<(true && ... && xs::value)>>
val_add<C = identity>::f<xs...>= C::f<val<(xs::value + ...)>>
val_add0<C = identity>= if_<size<>, val_add<C>, always<val<0>, C>>
val_left_add<C = identity>::f<xs...>= C::f<val<(... + xs::value)>>
val_left_add0<C = identity>= if_<size<>, val_left_add<C>, always<val<0>, C>>
val_sub<C = identity>::f<xs...>= C::f<val<(... - xs::value)>>
val_sub0<C = identity>= if_<size<>, val_sub<C>, always<val<0>, C>>
val_lshift<C = identity>::f<xs...>= C::f<val<(... << xs::value)>>
val_lshift0<C = identity>= if_<size<>, val_lshift<C>, always<val<0>, C>>
val_rshift<C = identity>::f<xs...>= C::f<val<(... >> xs::value)>>
val_rshift0<C = identity>= if_<size<>, val_rshift<C>, always<val<0>, C>>
val_mul<C = identity>::f<xs...>= C::f<val<(xs::value * ...)>>
val_mul0<C = identity>= if_<size<>, val_mul<C>, always<val<0>, C>>
val_mul1<C = identity>= if_<size<>, val_mul<C>, always<val<1>, C>>
val_left_mul<C = identity>::f<xs...>= C::f<val<(... * xs::value)>>
val_left_mul0<C = identity>= if_<size<>, val_left_mul<C>, always<val<0>, C>>
val_left_mul1<C = identity>= if_<size<>, val_left_mul<C>, always<val<1>, C>>
val_div<C = identity>::f<xs...>= C::f<val<(... / xs::value)>>
val_div0<C = identity>= if_<size<>, val_div<C>, always<val<0>, C>>
val_div1<C = identity>= if_<size<>, val_div<C>, always<val<1>, C>>
val_mod<C = identity>::f<xs...>= C::f<val<(... % xs::value)>>
val_mod0<C = identity>= if_<size<>, val_mod<C>, always<val<0>, C>>
val_mod1<C = identity>= if_<size<>, val_mod<C>, always<val<1>, C>>
val_xor<C = identity>::f<xs...>= C::f<val<(xs::value ^ ...)>>
val_xor0<C = identity>= if_<size<>, val_xor<C>, always<val<0>, C>>
val_left_xor<C = identity>::f<xs...>= C::f<val<(... ^ xs::value)>>
val_left_xor0<C = identity>= if_<size<>, val_left_xor<C>, always<val<0>, C>>
val_bit_and<C = identity>::f<xs...>= C::f<val<(xs::value & ...)>>
val_bit_and0<C = identity>= if_<size<>, val_bit_and<C>, always<val<0>, C>>
val_left_bit_and<C = identity>::f<xs...>= C::f<val<(... & xs::value)>>
val_left_bit_and0<C = identity>= if_<size<>, val_bit_and<C>, always<val<0>, C>>
val_bit_or<C = identity>::f<xs...>= C::f<val<(xs::value | ...)>>
val_bit_or0<C = identity>= if_<size<>, val_bit_or<C>, always<val<0>, C>>
val_left_bit_or<C = identity>::f<xs...>= C::f<val<(... | xs::value)>>
val_left_bit_or0<C = identity>= if_<size<>, val_left_bit_or<C>, always<val<0>, C>>
val_neg<C = identity>::f<x>= C::f<val<(-x::value)>>
val_unary_plus<C = identity>::f<x>= C::f<val<(+x::value)>>
val_not<C = identity>::f<x>= C::f<val<(!x::value)>>
val_bit_not<C = identity>::f<x>= C::f<val<(~x::value)>>
val_inc<C = identity>::f<x>= C::f<val<(x::value+1)>>
val_dec<C = identity>::f<x>= C::f<val<(x::value-1)>>
val_equal<C = identity>::f<x, y>= C::f<val<(x::value == y::value)>>
val_not_equal<C = identity>::f<x, y>= C::f<val<(x::value != y::value)>>
val_less<C = identity>::f<x, y>= C::f<val<(x::value < y::value)>>
val_less_equal<C = identity>::f<x, y>= C::f<val<(x::value <= y::value)>>
val_greater<C = identity>::f<x, y>= C::f<val<(x::value > y::value)>>
val_greater_equal<C = identity>::f<x, y>= C::f<val<(x::value >= y::value)>>
val_equal_to<N, C = identity>= push_back<N, val_equal<C>>
val_not_equal_to<N, C = identity>= push_back<N, val_not_equal<C>>
val_less_than<N, C = identity>= push_back<N, val_less<C>>
val_less_equal_than<N, C = identity>= push_back<N, val_less_equal<C>>
val_greater_than<N, C = identity>= push_back<N, val_greater<C>>
val_greater_equal_than<N, C = identity>= push_back<N, val_greater_equal<C>>
val_equal_to_c<auto x, C = identity>= val_equal_to<val<x>, C>
val_not_equal_to_c<auto x, C = identity>= val_not_equal_to<val<x>, C>
val_less_than_c<auto x, C = identity>= val_less_than<val<x>, C>
val_less_equal_than_c<auto x, C = identity>= val_less_equal_than<val<x>, C>
val_greater_than_c<auto x, C = identity>= val_greater_than<val<x>, C>
val_greater_equal_than_c<auto x, C = identity>= val_greater_equal_than<val<x>, C>
values<C = listify>::f<xs...>= C::f<val<xs::value>...>
typed_values<C = listify>::f<T, xs...>= C::f<val<T(xs::value)>...>

Detailed descriptions

Group: algorithm

<jln/mp/algorithm/unfold.hpp>

Some<value, next = value>

Implementation

mp::list<value, next>

None

Implementation

mp::stop_recursion

unfold<F, C = listify>

Return: list

Unfold F until returning None.

When F returns Some<value,next>, value is added to the results list and next is used for the next iteration.

Implementation

mp::recursively</*...*/, mp::pop_front<C>>

Semantics

unfold< if_< less_than_c<5>, inc<lift<Some>>, None > >::f< number<0> > == list<number<1>, number<2>, number<3>, number<4>, number<5>>

emp::unfold<state, F, C = mp::listify> = mp::unfold<F, C>::f<state>

<jln/mp/algorithm/accumulate.hpp>

accumulate<F, C = identity>::f<state, seqs...>

Return: value

Computes the recursive invocation of F with the result of the previous invocation and each element of one or more lists traversed in parallel from the beginning to the end.

Implementation

zip<push_front<state, fold<flip<unpack<F>>, C>>>::f<seqs...>

Pre-condition

  • all seqs must be the same size

Semantics

Equivalent to C::f<fold<F>::f< ... fold<F>::f<fold<F>::f<state, ...seqs[:][0]>, ...seqs[:][1]> ..., ...seqs[:][n-1]> >>

emp::accumulate<L, state, F, C = mp::identity> = unpack<L, mp::zip<mp::push_front<state, mp::fold<mp::flip<mp::unpack<F>>, C>>>>

<jln/mp/algorithm/all_of.hpp>

all_of<Pred, C = identity>::f<xs...>

Return: true_ / false_

Checks whether a predicate holds for all elements of a sequence.

Implementation

C::f</*...*/>

emp::all_of<L, Pred, C = mp::identity> = unpack<L, mp::all_of<Pred, C>>

emp::all_of_xs<Pred, xs...> = mp::all_of<Pred>::f<xs...>

bool emp::all_of_v<L, Pred, C = mp::identity> = unpack<L, mp::all_of<Pred, C>>::value

bool emp::all_of_xs_v<Pred, xs...> = mp::all_of<Pred>::f<xs...>::value

<jln/mp/algorithm/anticirculant_matrix.hpp>

anticirculant_matrix_with<F = listify, C = listify>::f<xs...>

Return: value

square matrix in which all row vectors are composed of the same elements and each row vector is rotated one element to the left relative to the preceding row vector.

Implementation

JLN_MP_MAKE_INTEGER_SEQUENCE(sizeof...(xs), /*...*/)::f<xs...>

Semantics

anticirculant_matrix_with<>::f<a, b, c, d> == list< list<a, b, c, d>, list<b, c, d, a>, list<c, d, a, b>, list<d, a, b, c> >

anticirculant_matrix<C = listify>

emp::anticirculant_matrix_with<L, F, C = mp::listify> = unpack<L, mp::anticirculant_matrix_with<F, C>>

emp::anticirculant_matrix<L, C = mp::listify> = unpack<L, mp::anticirculant_matrix<C>>

<jln/mp/algorithm/any_of.hpp>

any_of<Pred, C = identity>

Return: true_ / false_

Checks whether a predicate holds for at least some element of a sequence.

Implementation

none_of<Pred, not_<C>>

emp::any_of<L, Pred, C = mp::identity> = unpack<L, mp::any_of<Pred, C>>

emp::any_of_xs<Pred, xs...> = mp::any_of<Pred>::f<xs...>

bool emp::any_of_v<L, Pred, C = mp::identity> = unpack<L, mp::any_of<Pred, C>>::value

bool emp::any_of_xs_v<Pred, xs...> = mp::any_of<Pred>::f<xs...>::value

<jln/mp/algorithm/arrange.hpp>

arrange<Ints, C = listify>

Return: list

Uses a list of indexes to reorder a sequence.

Semantics

Equivalent to arrange<numbers<0, 2, 0>>::f<a, b, c, d> == list<a, c, a>

arrange_c<int... ints>

arrange_c_with<C, int... ints>

emp::arrange<L, Ints, C = listify> = unpack<L, mp::arrange<Ints, C>>

emp::arrange_c<L, int... ints> = unpack<L, /*...*/>

emp::arrange_with_c<L, C, int... ints> = unpack<L, /*...*/>

<jln/mp/algorithm/circulant_matrix.hpp>

circulant_matrix_with<F = listify, C = listify>::f<xs...>

Return: value

square matrix in which all row vectors are composed of the same elements and each row vector is rotated one element to the right relative to the preceding row vector.

Implementation

JLN_MP_MAKE_INTEGER_SEQUENCE(sizeof...(xs), /*...*/)::f<xs...>

Semantics

circulant_matrix_with<>::f<a, b, c, d> == list< list<a, b, c, d>, list<d, a, b, c>, list<c, d, a, b>, list<b, c, d, a> >

circulant_matrix<C = listify>

Implementation

circulant_matrix_with<listify, C>

emp::circulant_matrix_with<L, F, C = mp::listify> = unpack<L, mp::circulant_matrix_with<F, C>>

emp::circulant_matrix<L, C = mp::listify> = unpack<L, mp::circulant_matrix<C>>

<jln/mp/algorithm/compare_with.hpp>

compare_with<F, Cmp = less<>>

Return: true_ / false_

comparison on the result of a function.

Implementation

each<F, F, Cmp>

emp::compare_with<F, x, y, Cmp = mp::less<>> = Cmp::f<F::f<x>, F::f<y>>

bool emp::compare_with_v<F, x, y, Cmp = mp::less<>> = Cmp::f<F::f<x>, F::f<y>>::value

<jln/mp/algorithm/contains.hpp>

contains<x, C = identity>

Return: true_ / false_

Checks whether a value is contained in a list.

Implementation

any_of<is<x>, C>

emp::contains<L, x, C = mp::identity> = unpack<L, mp::contains<x, C>>

bool emp::contains_v<L, x, C = mp::identity> = unpack<L, mp::contains<x, C>>::value

<jln/mp/algorithm/count.hpp>

count_if<Pred, C = identity>

Counts all elements that satisfy a predicate.

Implementation

transform<Pred, add0<C>>

count<x, C = identity>

Counts all elements identical to a value.

Implementation

transform<is<x>, add0<C>>

emp::count_if<L, Pred, C = mp::identity> = unpack<L, mp::count_if<Pred, C>>

emp::count<L, x, C = mp::identity> = unpack<L, mp::count<x, C>>

int_ emp::count_if_v<L, Pred, C = mp::identity> = unpack<L, mp::count_if<Pred, C>>::value

int_ emp::count_v<L, x, C = mp::identity> = unpack<L, mp::count<x, C>>::value

int_ emp::count_xs_v<x, xs...> = (std::is_same_v<x, xs> + ... + 0)

<jln/mp/algorithm/counter.hpp>

counter_wrapped_with<F, C = listify>::f<xs...>

Return: sequence of list of type and number

Counts all distinct elements and returns a list of pairs containing the type and the repeat count.

Elements are sorted in order of first appearance.

Implementation

decltype(unique</*...*/>::f<xs...>::f<C, F::f, xs...>())::f<>

Semantics

counter<F>::f<int, int, char, double, int, double> == list< F::f<int, number<3>>, F::f<char, number<1>>, F::f<double, number<2>> >

counter<C = listify>

Return: sequence of list of type and number

Counts all distinct elements and returns a list of pairs containing the type and the repeat count.

Elements are sorted in order of first appearance.

Implementation

counter_wrapped_with<listify, C>

Semantics

counter<F>::f<int, int, char, double, int, double> == list< list<int, number<3>>, list<char, number<1>>, list<double, number<2>> >

emp::counter<L, C = mp::listify> = unpack<L, mp::counter<C>>

emp::counter_wrapped_with<L, F = mp::listify, C = mp::listify> = unpack<L, mp::counter_wrapped_with<F, C>>

<jln/mp/algorithm/ends_with.hpp>

ends_with<Seq, C = identity>

Return: true_ / false_

Checks if the sequence ends with the given prefix.

ends_with<list<Ts...>, C>::f<xs...>

Implementation

C::f</*...*/>

emp::ends_with<L, Seq, C = mp::identity> = unpack<L, ends_with<Seq, C>>

bool emp::ends_with_v<L, Seq, C = mp::identity> = unpack<L, ends_with<Seq, C>>::value

<jln/mp/algorithm/flatten.hpp>

flatten_once<S = lift<list>, C = listify>

Return: sequence

Remove 1 dimension level from a sequence.

Semantics

call<flatten_once<>, list<a, b>, c, list<list<d, e>, f> == list<a, b, c, list<d, e>, f>

flatten_once<lift<S, identity>, C>::f<xs...>

flatten_once_f<template<class...> S, C = listify>

Implementation

flatten_once<lift<S>, C>

flatten<S = lift<list>, C = listify>

Return: sequence

Recursive version of flatten_once.

call<flatten<>, list<a, b>, c, list<list<d, e>, f> == list<a, b, c, d, e, f>

flatten<lift<S, identity>, C>::f<xs...>

flatten_f<template<class...> S, C = listify>

Implementation

flatten<lift<S>, C>

emp::flatten_once<L, S = wrapper<L>, C = mp::listify> = unpack<L, mp::flatten_once<S, C>>

emp::flatten<L, S = wrapper<L>, C = mp::listify> = unpack<L, mp::flatten<S, C>>

emp::flatten_once_f<L, template<class...> S, C = mp::listify> = unpack<L, mp::flatten_once_f<S, C>>

emp::flatten_f<L, template<class...> S, C = mp::listify> = unpack<L, mp::flatten_f<S, C>>

<jln/mp/algorithm/intersperse.hpp>

intersperse<x, C = listify>::f<xs...>

Return: list

Inserts a value between each element of a sequence.

emp::intersperse<L, x, C = mp::listify> = unpack<L, mp::intersperse<x, C>>

<jln/mp/algorithm/is_disjoint.hpp>

is_disjoint_with<Cmp = same<>, C = identity>::f<seqs...>

Return: true_ / false_

Checks whether value in seqs[0] are disjoint from the value in seqs[1:].

Returns mp::true_ when sizeof...(seqs) < 2

Implementation

C::f</*...*/>

is_disjoint<C = identity>

Return: true_ / false_

Checks whether value in seqs[0] are disjoint from the value in seqs[1:].

Returns mp::true_ when sizeof...(seqs) < 2

Implementation

is_disjoint_with<same<>, C>

emp::is_disjoint<L1, L2, C = mp::identity> = is_disjoint<C>::f<L1, L2>

emp::is_disjoint_with<L1, L2, Cmp = same<>, C = mp::identity> = is_disjoint_with<Cmp, C>::f<L1, L2>

bool emp::is_disjoint_v<L1, L2> = is_disjoint<>::f<L1, L2>::value

bool emp::is_disjoint_with_v<L1, L2, Cmp = same<>> = is_disjoint_with<Cmp>::f<L1, L2>::value

<jln/mp/algorithm/is_sorted.hpp>

is_sorted<Cmp = less<>, C = identity>::f<xs...>

Return: true_ / false_

Checks whether a sequence is sorted.

emp::is_sorted<L, Cmp = mp::less<>, C = mp::identity> = unpack<L, mp::is_sorted<Cmp, C>>

bool emp::is_sorted_v<L, Cmp = mp::less<>, C = mp::identity> = unpack<L, mp::is_sorted<Cmp, C>>::value

<jln/mp/algorithm/is_subset.hpp>

is_subset_with<Cmp = same<>, C = identity>::f<seqs...>

Return: true_ / false_

Checks whether value in seqs[0] are subset from the value in seqs[1:].

Returns mp::true_ when sizeof...(seqs) < 2

Implementation

C::f</*...*/>

is_subset<C = identity>

Return: true_ / false_

Checks whether value in seqs[0] are subset from the value in seqs[1:].

Returns mp::true_ when sizeof...(seqs) < 2

Implementation

is_subset_with<same<>, C>

emp::is_subset<L1, L2, C = mp::identity> = is_subset<C>::f<L1, L2>

emp::is_subset_with<L1, L2, Cmp = mp::same<>, C = mp::identity> = is_subset_with<Cmp, C>::f<L1, L2>

bool emp::is_subset<L1, L2> = is_subset<>::f<L1, L2>::value

bool emp::is_subset_with<L1, L2, Cmp = mp::same<>> = is_subset_with<Cmp>::f<L1, L2>::value

<jln/mp/algorithm/is_unique.hpp>

is_unique_if<Cmp = same<>, C = identity>::f<xs...>

Return: true_ / false_

Checks whether all values are unique.

is_unique<C = identity>

Return: true_ / false_

Checks whether all values are unique.

Implementation

is_unique_if<same<>, C>

emp::is_unique<L, C = mp::identity> = unpack<L, mp::is_unique_if<mp::same<>, C>>

emp::is_unique_if<L, Cmp = mp::same<>, C = mp::identity> = unpack<L, mp::is_unique_if<Cmp, C>>

<jln/mp/algorithm/lexicographical_compare.hpp>

lexicographical_compare<Cmp = less<>, C = identity>::f<seq1, seq2>

Return: true_ / false_

Checks if seq1 is lexicographically less than seq2.

Implementation

C::f<mismatch</*...*/, lift</*...*/>>::f<seq1, seq2>::f<Cmp, seq1, seq2>>

lexicographical_compare2<CmpLess = less<>, CmpEq = equal<>, C = identity>::f<seq1, seq2>

Implementation

C::f<mismatch<CmpEq, lift</*...*/>>::f<seq1, seq2>::f<CmpLess, seq1, seq2>>

emp::lexicographical_compare<seq1, seq2, Cmp = mp::less<>, C = mp::identity> = lexicographical_compare<Cmp, C>::f<seq1, seq2>

emp::lexicographical_compare2<seq1, seq2, CmpLess = mp::less<>, CmpEq = mp::equal<>, C = mp::identity> = lexicographical_compare2<CmpLess, CmpEq, C>::f<seq1, seq2>

bool emp::lexicographical_compare_v<seq1, seq2, Cmp = mp::less<>, C = mp::identity> = lexicographical_compare<Cmp, C>::f<seq1, seq2>::value

<jln/mp/algorithm/merge.hpp>

merge<Cmp = less<>, C = listify>::f<seq1, seq2>

Return: sequence

Merges two list into one sorted sequence.

Pre-condition

Post-condition

emp::merge<L, Cmp = mp::less<>, C = listify> = unpack<L, mp::merge<Cmp, C>>

<jln/mp/algorithm/mismatch.hpp>

mismatch<Cmp = equal<>, TC = listify, FC = TC>::f<seq1, seq2>

Return: pair or number

Returns mismatching info of elements from two sequences.

Uses TC when a element mismatch and FC when one of the sequences equals the start of the other.

Semantics

FC::f<number<-1>, number<emp::size<seq1>>> if seq1 == seq2. FC::f<number<i>, number<-1>> if seq2 starts with seq1. FC::f<number<i>, number<1>> if seq1 starts with seq2. otherwise TC::f<number<i>, number<0>>.

emp::mismatch<seq1, seq2, Cmp = mp::equal<>, TC = mp::listify, FC = TC> = mismatch<Cmp, TC, FC>::f<seq1, seq2>

<jln/mp/algorithm/mismatch_index.hpp>

mismatch_index<Cmp = equal<>, C = identity>

Return: number

Returns the first mismatching index of elements from two sequences, otherwise the size of the sequences.

Implementation

mismatch<Cmp, at0<C>, if_<at0<is<number<-1>>>, at1<C>, at0<C>>>

emp::mismatch_index<seq1, seq2, Cmp = mp::equal<>, C = mp::identity> = mismatch_index<Cmp, C>::f<seq1, seq2>

bool emp::mismatch_index_v<seq1, seq2, Cmp = mp::equal<>, C = mp::identity> = mismatch_index<Cmp, C>::f<seq1, seq2>::value

<jln/mp/algorithm/none_of.hpp>

none_of<Pred, C = identity>::f<xs...>

Return: true_ / false_

Checks whether a predicate does not hold for any element of a sequence.

Implementation

C::f</*...*/>

emp::none_of<L, Pred, C = mp::identity> = unpack<L, mp::none_of<Pred, C>>

emp::none_of_xs<Pred, xs...> = mp::none_of<Pred>::f<xs...>

bool emp::none_of_v<L, Pred, C = mp::identity> = unpack<L, mp::none_of<Pred, C>>::value

bool emp::none_of_xs_v<Pred, xs...> = mp::none_of<Pred>::f<xs...>::value

<jln/mp/algorithm/pairwise_fold.hpp>

pairwise_fold_and_transform_front<F, Front = identity, C = listify>::f<xs...>

Return: sequence

Computes the differences between adjacent pair of elements.

Semantics

pairwise_fold_and_transform_front<F, G, C>::f<a, b, c> = C::f<G::f<a>, F::f<a, b>, F::f<b, c>> pairwise_fold_and_transform_front<F, G, C>::f<a> = C::f<G::f<a>> pairwise_fold_and_transform_front<F, G, C>::f<> = C::f<>

pairwise_fold<F, C = listify>

Return: sequence

Computes the differences between adjacent pair of elements.

Semantics

pairwise_fold<F, C>::f<a, b, c> = C::f<a, F::f<a, b>, F::f<b, c>> pairwise_fold<F, C>::f<a> = C::f<a> pairwise_fold<F, C>::f<> = C::f<>

emp::pairwise_fold_and_transform_front<L, F, Front = mp::identity, C = mp::listify> = unpack<L, mp::pairwise_fold_and_transform_front<F, Front, C>>

emp::pairwise_fold<L, F, C = mp::listify> = unpack<L, mp::pairwise_fold_and_transform_front<F, mp::identity, C>>

<jln/mp/algorithm/prefix.hpp>

prefix<x, C = listify>::f<xs...>

Return: list

Inserts a value before each element of a sequence.

emp::prefix<L, x, C = mp::listify> = unpack<L, mp::prefix<x, C>>

<jln/mp/algorithm/remove_prefix.hpp>

remove_prefix<Seq, TC = listify, FC = TC>

Return: sequence

Remove the first elements corresponding to a prefix.

Calls TC with the rest of sequence when the prefix is found, otherwise calls FC with the whole sequence.

f<xs...>

Implementation

decltype(impl(static_cast<list<xs...>*>(nullptr)))

emp::remove_prefix<L, Seq, TC = mp::listify, FC = TC> = unpack<L, remove_prefix<Seq, TC, FC>>

<jln/mp/algorithm/remove_suffix.hpp>

remove_suffix<Seq, TC = listify, FC = TC>

Return: sequence

Remove the last elements corresponding to a suffix.

Calls TC with the rest of sequence when the suffix is found, otherwise calls FC with the whole sequence.

remove_suffix<list<Ts...>, TC, FC>::f<xs...>

Implementation

conditional_c</*...*/>::f<take_front_c<static_cast<unsigned>(sizeof...(xs) - sizeof...(Ts)), TC>, FC>::f<xs...>

emp::remove_suffix<L, Seq, TC = mp::listify, FC = TC> = unpack<L, remove_suffix<Seq, TC, FC>>

<jln/mp/algorithm/repeat.hpp>

repeat_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Returns a sequence that contains a number of copies of the same sequence.

Implementation

JLN_MP_MAKE_INTEGER_SEQUENCE_T(int, N, /*...*/)::f<C, xs...>

Pre-condition

  • N >= 0

repeat<N, C = listify>

Implementation

repeat_c<N::value, C>

emp::repeat<L, n, C = mp::listify> = unpack<L, mp::repeat<n, C>>

emp::repeat_c<L, int_ n, C = mp::listify> = unpack<L, mp::repeat_c<n, C>>

<jln/mp/algorithm/replace.hpp>

replace_if<Pred, T, C = listify>

Return: sequence

Replaces every occurrence that satisfy a predicate by some value.

Implementation

transform</*...*/, C>

replace<T, U, C = listify>

Return: sequence

Replaces every occurrence of a value by another value.

Implementation

replace_if<is<T>, U, C>

emp::replace<L, T, U, C = mp::listify> = unpack<L, mp::replace<T, U, C>>

emp::replace_if<L, Pred, T, C = mp::listify> = unpack<L, mp::replace_if<Pred, T, C>>

<jln/mp/algorithm/reverse.hpp>

reverse<C = listify>::f<xs...>

Return: sequence

Reverses the order of the elements of a sequence.

emp::reverse<L, C = mp::listify> = unpack<L, mp::reverse<C>>

<jln/mp/algorithm/rotate.hpp>

rotate_c<int_ N, C = listify>::f<xs...>

Return: sequence

Rotates the elements of a sequence around a pivot.

N
a negative value start to end of sequence. The final offset is a modulo of sizeof...(xs).

Semantics

Equivalent to len = sizeof...(xs) n = len ? (N < 0 ? len + N % len : N) % size : 0 C::f<...xs[n:], ...xs[:n]>

rotate<N, C = listify>

Implementation

rotate_c<N::value, C>

emp::rotate<L, n, C = mp::listify> = unpack<L, mp::rotate<n, C>>

emp::rotate_c<L, int_ n, C = mp::listify> = unpack<L, mp::rotate_c<n, C>>

<jln/mp/algorithm/same.hpp>

same<C = identity>::f<xs...>

Return: true_ / false_

Checks whether all values are identical.

Implementation

C::f<number<emp::same_xs_v<xs...>>>

same_v<C = identity>::f<xs...>

Implementation

C::f<emp::same_xs_v<xs...>>

emp::same<L, C = mp::identity> = unpack<L, mp::same<C>>

bool emp::same_v<L, C = mp::identity> = unpack<L, mp::same<C>>::value

<jln/mp/algorithm/same_xs.hpp>

bool emp::same_xs_v<xs...> = true

<jln/mp/algorithm/scan.hpp>

scan<F, C = listify>::f<xs...>

Return: sequence

Fold a sequence to the left and return a list containing the successive reduction states.

Semantics

Equivalent to C::f< xs[0], F::f<xs[0], xs[1]>, F::f<F::f<xs[0], xs[1]>, xs[2]>, ... >

emp::scan<L, F, C = mp::listify> = unpack<L, mp::scan<F, C>>

<jln/mp/algorithm/scan_right.hpp>

scan_right<F, C = listify>

Return: sequence

Fold a sequence to the right and return a list containing the successive reduction states.

Implementation

reverse</*...*/>

Semantics

Equivalent to C::f< ... F::f<xs[n-3], F::f<xs[n-2], xs[n-1]>>, F::f<xs[n-2], xs[n-1]>, xs[n-1], >

emp::scan_right<L, F, C = mp::listify> = unpack<L, mp::scan_right<F, C>>

<jln/mp/algorithm/similar.hpp>

similar<C = identity>::f<xs...>

Return: true_ / false_

Checks whether all types are the same or instantiations of the same class template.

The list of supported class templates are: - template<class...> - template<class T, T...> - template<class, std::size_t> - template<std::size_t, class...> - template<class, auto...> (when supported) - template<auto, class...> (when supported) - template<auto...> (when supported)

Implementation

C::f<number<emp::similar_xs_v<xs...>>>

similar_v<C = identity>::f<xs...>

Implementation

C::f<emp::similar_xs_v<xs...>>

bool emp::similar_xs_v<xs...> = same_xs_v</*...*/...>

emp::similar<L, C = mp::identity> = unpack<L, mp::similar<C>>

bool emp::similar_v<L, C = mp::identity> = unpack<L, mp::similar<C>>::value

<jln/mp/algorithm/sort.hpp>

sort<Cmp = less<>, C = listify>::f<xs...>

Return: sequence

Sorts the elements of a sequence according to an ordering relation.

Sorting is stable.

Post-condition

stable_sort<Cmp = less<>, C = listify>

Implementation

sort<Cmp, C>

emp::sort<L, Cmp = mp::less<>, C = listify> = unpack<L, mp::sort<Cmp, C>>

emp::stable_sort<L, Cmp = mp::less<>, C = listify> = unpack<L, mp::sort<Cmp, C>>

<jln/mp/algorithm/starts_with.hpp>

starts_with<Seq, C = identity>

Return: true_ / false_

Checks if the sequence begins with the given prefix.

starts_with<list<Ts...>, C>

f<xs...>

Implementation

C::f<decltype(impl(static_cast<list<xs...>*>(nullptr)))>

emp::starts_with<L, Seq, C = mp::identity> = unpack<L, starts_with<Seq, C>>

bool emp::starts_with_v<L, Seq, C = mp::identity> = unpack<L, starts_with<Seq, C>>::value

<jln/mp/algorithm/suffix.hpp>

suffix<x, C = listify>::f<xs...>

Return: list

Inserts a value after each element of a sequence.

emp::suffix<L, x, C = mp::listify> = unpack<L, mp::suffix<x, C>>

<jln/mp/algorithm/transform.hpp>

transform<F, C = listify>::f<xs...>

Return: sequence

Executes F on every element of a sequence.

Implementation

JLN_MP_DCALL_TRACE_XS(xs, C, JLN_MP_DCALL_TRACE_XS(xs, F, xs)...)

emp::transform<L, F, C = mp::listify> = unpack<L, mp::transform<F, C>>

<jln/mp/algorithm/transform_first.hpp>

transform_first<F, C = listify>

Return: list

Replace the first element of the sequence.

Implementation

partial_each<F, C>

emp::transform_first<L, F, C = listify> = unpack<L, mp::partial_each<F, C>>

<jln/mp/algorithm/transform_second.hpp>

transform_second<F, C = listify>

Return: list

Replace the second element of the sequence.

Implementation

partial_each<identity, F, C>

emp::transform_second<L, F, C = listify> = unpack<L, mp::partial_each<mp::identity, F, C>>

<jln/mp/algorithm/transform_third.hpp>

transform_third<F, C = listify>

Return: list

Replace the third element of the sequence.

Implementation

partial_each<identity, identity, F, C>

emp::transform_third<L, F, C = listify> = unpack<L, mp::partial_each<mp::identity, mp::identity, F, C>>

<jln/mp/algorithm/unique.hpp>

unique<C = listify>

Return: set

Returns a list with duplicate elements removed.

unique_if<Cmp = same<>, C = listify>

Return: sequence

Returns a list with duplicate elements removed.

Only the first element found is kept.

emp::unique<L, C = mp::listify> = unpack<L, unique<C>>

emp::unique_if<L, Cmp = mp::same<>, C = mp::listify> = unpack<L, unique_if<Cmp, C>>

Group: filter

<jln/mp/algorithm/compress.hpp>

compress_c_with<C, bool... selectors>::f<xs...>

Return: sequence

Removes elements that have a corresponding element in selectors to 0.

Pre-condition

Semantics

compress_c<1,0,1,0,1,1> ::f<a,b,c,d,e,f> == list<a, c, e,f>

compress_c<bool... selectors>

Implementation

compress_c_with<listify, selectors...>

compress_for<Selectors...>

Implementation

compress_c_with<listify, Selectors::value...>

compress<Selectors, C = listify>

emp::compress<L, Selectors, C = mp::listify> = unpack<L, /*...*/>

emp::compress_for<L, Selectors...> = unpack<L, mp::compress_c_with<listify, Selectors::value...>>

emp::compress_c<L, bool... selectors> = unpack<L, mp::compress_c_with<listify, selectors...>>

emp::compress_c_with<L, C, bool... selectors> = unpack<L, mp::compress_c_with<C, selectors...>>

<jln/mp/algorithm/copy.hpp>

copy_if<Pred, C = listify>

Return: sequence

Copies all elements that satisfy a predicate.

Implementation

transform<wrap_in_list_if<Pred>, join<C>>

copy<x, C = listify>

Return: sequence

Copies all occurence of a value.

Implementation

copy_if<is<x>, C>

emp::copy_if<L, Pred, C = mp::listify> = unpack<L, mp::copy_if<Pred, C>>

emp::copy<L, x, C = mp::listify> = unpack<L, mp::copy<x, C>>

<jln/mp/algorithm/remove_adjacent.hpp>

remove_adjacent_if<BinaryPred, C = listify>

Return: sequence

Removes each element in a sequence which respect a predicate with privious element.

Implementation

pairwise_fold_and_transform_front<if_<BinaryPred, always<list<>>, pop_front<>>, listify, join<C>>

remove_adjacent<C = listify>

Return: sequence

Removes each element in a sequence which is the same type as the privious element.

Implementation

remove_adjacent_if<same<>, C>

emp::remove_adjacent_if<L, BinaryPred, C = mp::listify> = unpack<L, mp::remove_adjacent_if<BinaryPred, C>>

emp::remove_adjacent<L, C = mp::listify> = unpack<L, mp::remove_adjacent<C>>

<jln/mp/algorithm/remove.hpp>

remove_if<Pred, C = listify>

Return: sequence

Removes all elements that satisfy a predicate.

Implementation

transform<wrap_in_list_if_not<Pred>, join<C>>

remove<T, C = listify>

Return: sequence

Removes all occurence of a value.

Implementation

remove_if<is<T>, C>

emp::remove_if<L, Pred, C = mp::listify> = unpack<L, mp::remove_if<Pred, C>>

emp::remove<L, T, C = mp::listify> = unpack<L, mp::remove<T, C>>

<jln/mp/algorithm/remove_unique.hpp>

remove_unique<C = listify>::f<xs...>

Return: sequence

Remove unique elements from a sequence.

remove_unique_if<Cmp = same<>, C = listify>

Return: sequence

Remove unique elements from a sequence.

copy_unique<C = listify>::f<xs...>

Return: sequence

Copy unique elements from a sequence.

copy_unique_if<Cmp = same<>, C = listify>

Return: sequence

Copy unique elements from a sequence.

emp::remove_unique<L, C = mp::listify> = unpack<L, remove_unique<C>>

emp::remove_unique_if<L, Cmp = mp::same<>, C = mp::listify> = unpack<L, remove_unique_if<Cmp, C>>

emp::copy_unique<L, C = mp::listify> = unpack<L, copy_unique<C>>

emp::copy_unique_if<L, Cmp = mp::same<>, C = mp::listify> = unpack<L, copy_unique_if<Cmp, C>>

Group: functional

<jln/mp/functional/apply_or_identity.hpp>

apply_or_identity<Pred, TC>

Return: value

Return \p TC::f<x> if \p Pred::f<x>, otherwise returns \p x.

Implementation

if_<Pred, TC, identity>

emp::apply_or_identity<Pred, TC, x> = mp::if_<Pred, TC, mp::identity>::f<x>

<jln/mp/functional/bind_back.hpp>

bind_back<F, BoundArgs...>::f<xs...>

Return: sequence

Invoking F with its last parameters bound to bound to args.

Implementation

F::f<xs..., BoundArgs...>

Semantics

bind_back<F, c, d>::f<a, b> == F<a, b, c, d>

bind_back_c<F, int_... BoundArgs>

Implementation

bind_back<F, number<BoundArgs>...>

bind_back_v<F, auto... BoundArgs>::f<xs...>

Implementation

JLN_MP_CALLER_XS(xs, F)::f<xs..., BoundArgs...>

emp::bind_back<L, F, BoundArgs...> = unpack_append<L, F, BoundArgs...>

emp::bind_back_c<L, F, int_... BoundArgs> = unpack_append<L, F, number<BoundArgs>...>

emp::bind_back_v<L, F, auto... BoundArgs> = unpack<L, mp::bind_back_v<F, BoundArgs...>>

<jln/mp/functional/bind_front.hpp>

bind_front<F, BoundArgs...>::f<xs...>

Return: sequence

Invoking F with its first parameters bound to bound to args.

Implementation

F::f<BoundArgs..., xs...>

Semantics

bind_front<F, a, b>::f<c, d> == F<a, b, c, d>

bind_front_c<F, int_... BoundArgs>

Implementation

bind_front<F, number<BoundArgs>...>

bind_front_v<F, auto... BoundArgs>::f<xs...>

Implementation

JLN_MP_CALLER_XS(xs, F)::f<BoundArgs..., xs...>

emp::bind_front<L, F, BoundArgs...> = unpack<L, F, BoundArgs...>

emp::bind_front_c<L, F, int_... BoundArgs> = unpack<L, F, number<BoundArgs>...>

emp::bind_front_v<L, F, auto... BoundArgs> = unpack<L, mp::bind_front_v<F, BoundArgs...>>

<jln/mp/functional/call.hpp>

call<C, xs...>

Implementation

C::f<xs...>

call_c<C, auto /*or int_*/... xs>

call_t<C, xs...>

Implementation

call<C, xs...>::type

<jln/mp/functional/capture_back.hpp>

capture_back<BoundArgs...>::f<F, xs...>

Return: sequence

Invoking F with its last parameters bound to args.

Implementation

F::f<xs..., BoundArgs...>

Semantics

capture_back<c, d>::f<F, a, b> == F<a, b, c, d>

capture_back_c<int_... BoundArgs>

Implementation

capture_back<number<BoundArgs>...>

capture_back_v<auto... BoundArgs>::f<F, xs...>

Implementation

F::f<xs..., BoundArgs...>

emp::capture_back<L, BoundArgs...> = unpack<L, mp::capture_back<BoundArgs...>>

emp::capture_back_c<L, int_... BoundArgs> = unpack<L, mp::capture_back_c<BoundArgs...>>

emp::capture_back_v<L, auto... BoundArgs> = unpack<L, mp::capture_back_v<BoundArgs...>>

<jln/mp/functional/capture_front.hpp>

capture_front<BoundArgs...>::f<F, xs...>

Return: sequence

Invoking F with its first parameters bound to args.

Implementation

F::f<BoundArgs..., xs...>

Semantics

capture_front<a, b>::f<F, c, d> == F<a, b, c, d>

capture_front_c<int_... BoundArgs>

Implementation

capture_front<number<BoundArgs>...>

capture_front_v<auto... BoundArgs>::f<F, xs...>

Implementation

F::f<BoundArgs..., xs...>

emp::capture_front<L, BoundArgs...> = unpack<L, mp::capture_front<BoundArgs...>>

emp::capture_front_c<L, int_... BoundArgs> = unpack<L, mp::capture_front_c<BoundArgs...>>

emp::capture_front_v<L, auto... BoundArgs> = unpack<L, mp::capture_front_v<BoundArgs...>>

<jln/mp/functional/cascade.hpp>

cascade<F, Fs...>

Recursively invokes functions to nested typelist of typelists.

Semantics

cascade<F0> = transform<F0> cascade<F0,F1,F2> = transform<unpack<transform<unpack<F0>, F1>>, F2>

<jln/mp/functional/compose.hpp>

compose_f<template<class...> F, template<class...> Fs...>

Return: function

Composition of two meta-functions or more.

Semantics

compose_f<foo, bar>::f<a, b> == bar<foo<a, b>>

compose<F, Fs...>

Return: function

Composition of two functions or more.

Implementation

conditional_c<sizeof...(Fs) == 0>::f<at1<F>, mp::fold_right<lift_t</*...*/>>>::f<identity, F, Fs...>

Semantics

compose<foo, bar>::f<a, b> == bar::f<foo::f<a, b>>

<jln/mp/functional/make_id.hpp>

default_make_id_tag

\endcond

next_id

Generates a unique id per call for a specified tag.

Signature: int next_id<class Tag = default_make_id_tag, start_id = 0, auto = []{}>()

id_of<T>::value

Return: int

Generates a unique id per type.

Implementation

next_id<default_make_id_tag, 0, []{}>()

int id_of_v<T>

Implementation

id_of<T>::value

id_of_t<T>

Implementation

number<id_of<T>::value>

tagged_id_of<Tag, T>::value

Return: int

Generates a unique id per type for a specified tag.

Implementation

next_id<Tag, 0, []{}>()

int tagged_id_of_v<Tag, T>

Implementation

tagged_id_of<Tag, T>::value

tagged_id_of_t<Tag, T>

Implementation

number<tagged_id_of<Tag, T>::value>

make_id_for<Tag, C = identity>::f<T>

Return: number

Generates a unique id per type.

Implementation

C::f<tagged_id_of_t<Tag, T>>

make_id<C = identity>

Implementation

make_id_for<default_make_id_tag, C>

<jln/mp/functional/each.hpp>

each<Fs..., C>::f<xs...>

Return: value

Invokes multiple functions each taking the parameter corresponding to its position.

Implementation

C::f<Fs::f<xs>...>

<jln/mp/functional/eval.hpp>

eval<auto F, C = identity>::f<xs...>

Return: value

Invokes a lambda function.

Implementation

C::f<decltype(F.operator()<xs...>())>

emp::eval<auto F, xs...> = decltype(F.operator()<xs...>())

<jln/mp/functional/fix.hpp>

fix<C>::f<xs...>

Return: value

Invokes a function computing the fixed point of a function.

Implementation

C::f<fix<C>, xs...>

emp::fix<F, xs...> = fix<F>::f<xs...>

<jln/mp/functional/flip.hpp>

flip<C = listify>::f<x0, x1, xs...>

Return: sequence

Invokes a function with its two first arguments reversed.

Implementation

C::f<x1, x0, xs...>

Semantics

C::f<xs[1], xs[0], ...xs[2:]>

emp::flip<L, C = mp::listify> = unpack<L, mp::flip<C>>

<jln/mp/functional/identity.hpp>

identity::f<x>

Return: value

Implementation

x

emp::identity<x> = x

<jln/mp/functional/if.hpp>

if_<Pred, TC, FC = always<false_>>::f<xs...>

Return: value

A conditional expression.

Implementation

mp::conditional_c<!Pred::f<xs...>::value>::f<FC, TC>::f<xs...>

emp::if_<Pred, TC, FC, xs...> = mp::if_<Pred, TC, FC>::f<xs...>

<jln/mp/functional/invoke_twice.hpp>

invoke_twice<F>::f<xs...>

Return: value

Invokes twice.

Implementation

F::f<xs...>::f<xs...>

<jln/mp/functional/try.hpp>

is_na

Implementation

is<na>

violation

Implementation

always<na>

try_<F, TC = identity, FC = violation>::f<xs...>

Return: value

Invokes TC::f<result> whether FC::f<xs...> is a valid expression other than na, otherwhise invokes FC::f<xs...>.

Pre-condition

  • F::f<xs...> must be a SFINAE compatible expression

try_or_else<F, FC = violation>

Implementation

try_<F, identity, FC>

try_or<F, FT = na>

Implementation

try_<F, identity, always<FT>>

is_invocable<F, C = identity>

Return: true_ / false_

Checks whether F::f<xs...> is invocable.

Implementation

try_<F, always<true_, C>, always<false_, C>>

Pre-condition

  • F::f<xs...> must be a SFINAE compatible expression

is_not_invocable<F, C = identity>

Return: true_ / false_

Checks whether F::f<xs...> is not invocable.

Implementation

try_<F, always<false_, C>, always<true_, C>>

Pre-condition

  • F::f<xs...> must be a SFINAE compatible expression

emp::try_<F, TC, FC, xs...> = mp::try_<F, TC, FC>::f<xs...>

emp::try_or_else<F, FC, xs...> = mp::try_<F, mp::identity, FC>::f<xs...>

emp::try_or<F, FT, xs...> = mp::try_<F, mp::identity, always<FT>>::f<xs...>

bool emp::is_invocable_v<F, xs...> = !std::is_same_v<na, try_<F>::f<xs...>>

bool emp::is_not_invocable_v<F, xs...> = !is_invocable_v<F, xs...>

emp::is_invocable<F, xs...> = number<is_invocable_v<F, xs...>>

emp::is_not_invocable<F, xs...> = number<!is_invocable_v<F, xs...>>

<jln/mp/functional/lift.hpp>

lift_t<template<class...> F, C = identity>::f<xs...>

Return: value

Makes a function from a lazy meta-function.

Implementation

C::f<F::f<xs...>::type>

lift<template<class...> F, C = identity>::f<xs...>

Return: value

Makes a function from a meta-function.

Implementation

C::f<F::f<xs...>>

lift_v_t<template<auto /*or int_*/...> F, C = identity>::f<xs...>

Return: value

Makes a function from a lazy meta-function.

Implementation

C::f<F::f<xs::value...>::type>

lift_v<template<auto /*or int_*/...> F, C = identity>::f<xs...>

Return: value

Makes a function from a meta-function.

Implementation

C::f<F::f<xs::value...>>

<jln/mp/functional/monadic.hpp>

monadic<TC, FC = violation>

Return: value

Invokes FC whether na, otherwise TC.

Implementation

if_<is<na>, FC, TC>

monadic0<TC, FC = violation>

Return: value

Invokes FC whether first value is na, otherwise TC.

Implementation

if_<front<is<na>>, FC, TC>

monadic_xs<TC, FC = violation>

Return: value

Invokes FC whether any value is na, otherwise TC.

Implementation

if_<none_of<is<na>>, TC, FC>

monadic_if_na<x, template<class...> M, TC, FC = violation>

Return: value

Monadify only if x is na.

Implementation

conditional_c<std::is_same_v<na, x>>::f<M<TC, FC>, TC>

<jln/mp/functional/memoize.hpp>

na

Value that is not available.

This type is used in smp for a contract that is not respected.

memoize_call<C, xs...>

Memoization version of call.

memoize<C>::f<xs...>

Memoize a call to C::f<xs...>.

<jln/mp/functional/random.hpp>

next_random

Generates a unique id per call for a specified tag.

Signature: unsigned next_random<auto = []{}>()

random<C = identity, auto = []{}>::f<xs...>

Return: number

Generate a random number.

The seed can be configured with JLN_MP_RANDOM_SEED_TIME or JLN_MP_RANDOM_SEED_W and JLN_MP_RANDOM_SEED_Z

emp::random<auto v = []{}> = number<next_random<v>()>

unsigned emp::random_v<auto v = []{}> = next_random<v>()

<jln/mp/functional/not_fn.hpp>

not_fn<F, C = identity>

Return: true_ / false_

Returns the negation of F.

emp::not_of<F, xs...> = mp::number<!F::f<xs...>::value>

emp::not_fn<L, F, C = mp::identity> = unpack<L, mp::not_fn<F, C>>

<jln/mp/functional/partial.hpp>

partial<Fs..., C>::f<xs...>

Return: value

Invokes multiple functions each taking the parameter corresponding to its position (or without parameter whether it does not exist), then calls C with the results and the rest of the parameters.

Semantics

partial<F,G,C>::f<a> == C::f<F::f<a>, G::f<>> partial<F,G,C>::f<a,b,c,d> == C::f<F::f<a>, G::f<b>, c, d>

<jln/mp/functional/partial_each.hpp>

partial_each<Fs..., C>::f<xs...>

Return: value

Invokes multiple functions each taking the parameter corresponding to its position, then calls C with the results and the rest of the parameters.

Semantics

partial_each<F,G,C>::f<a> == partial_each<F,G,C>::f<a,b,c,d> == C::f<F::f<a>, G::f<b>, c, d>

<jln/mp/functional/partial_tee.hpp>

partial_tee<Fs..., C>::f<xs...>

Return: value

Invokes multiple functions passing all parameters to each then calls C with the results and the rest of the parameters.

Semantics

partial_tee<F,G,C>::f<a> == partial_tee<F,G,C>::f<a,b,c,d> == C::f<F::f<a,b,c,d>, G::f<a,b,c,d>, c, d>

<jln/mp/functional/partial_xs.hpp>

partial_xs<Fs..., C>::f<xs...>

Return: value

Invokes multiple functions passing all parameters to each (or without parameter whether it does not exist), then calls C with the results and the rest of the parameters.

Semantics

partial_xs<F,G,C>::f<a> == C::f<F::f<a>, G::f<>> partial_xs<F,G,C>::f<a,b,c,d> == C::f<F::f<a,b,c,d>, G::f<a,b,c,d>, c, d>

<jln/mp/functional/recursively.hpp>

stop_recursion::f<_...>

Stop the recursion, the input values will be used as result.

Implementation

stop_recursion

recursion_result::f<xs...>

Specify result values and stop recursion.

next_recursion::f<xs...>

Specify values for the next iteration.

recursively<F, C = identity>::f<xs...>

Return: value

Recursively invokes F until stop_recursion or recursion_result.

recursively_xs<F, C = listify>

Return: sequence

Same than recursively, but with listify as default continuation.

Implementation

recursively<F, C>

recursively_as_much_as_possible<F, C = identity>::f<xs...>

Return: value

Recursively invokes F until the result is stop_recursion, recursion_result or no longer changes.

recursively_as_much_as_possible_xs<F, C = listify>

Return: value

Same than recursively_as_much_as_possible, but with listify as default continuation.

Implementation

recursively_as_much_as_possible<F, C>

emp::recursively<L, F, C = mp::identity> = unpack<L, mp::recursively<F, C>>

emp::recursively_as_much_as_possible<L, F, C = mp::identity> = unpack<L, mp::recursively_as_much_as_possible<F, C>>

emp::recursively_xs<L, F, C = mp::listify> = unpack<L, mp::recursively<F, C>>

emp::recursively_as_much_as_possible_xs<L, F, C = mp::listify> = unpack<L, mp::recursively_as_much_as_possible<F, C>>

<jln/mp/functional/tee.hpp>

tee<Fs..., C>::f<xs...>

Return: value

Invokes multiple functions passing all parameters to each.

Implementation

C::f<Fs::f<xs...>...>

<jln/mp/functional/until.hpp>

until<Pred, F, C = identity>

Return: value

Apply a function until some predicate is satisfied.

Implementation

recursively<if_<Pred, stop_recursion, F>, C>

until_xs<Pred, F, C = listify>

Return: value

Apply a function until some predicate is satisfied.

Implementation

recursively<if_<Pred, stop_recursion, F>, C>

emp::until<L, Pred, F, C = mp::identity> = unpack<L, mp::until<Pred, F, C>>

emp::until_xs<L, Pred, F, C = mp::listify> = unpack<L, mp::until<Pred, F, C>>

<jln/mp/functional/until_last.hpp>

until_last<Searcher>

Return: sequence

Uses a Searcher in a loop until the last result.

Searcher must end with the continuations TC and FC. until_last_t<find, is<x>, TC, FC> is equivalent to find_last

until_last_t<template<class...> Tpl, Pred, TC = listify, FC = clear<TC>>

Implementation

Tpl<Pred, recursively<pop_front<Tpl<Pred, next_recursion, stop_recursion>>, TC>, FC>

partial_until_last_t<template<class...> Tpl, OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

Tpl<OffsetEnd, Pred, recursively<pop_front<Tpl<OffsetEnd, Pred, next_recursion, stop_recursion>>, TC>, FC>

partial_until_last_t_c<template<int_, class...> Tpl, int_ OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

Tpl<OffsetEnd, Pred, recursively<pop_front<Tpl<OffsetEnd, Pred, next_recursion, stop_recursion>>, TC>, FC>

emp::until_last<L, Searcher> = unpack<L, mp::until_last<Searcher>>

emp::until_last_t<L, template<class...> Tpl, Pred, TC = listify, FC = clear<TC>> = unpack<L, mp::until_last_t<Tpl, Pred, TC, FC>>

emp::partial_until_last_t<L, template<class...> Tpl, OffsetEnd, Pred, TC = listify, FC = clear<TC>> = unpack<L, mp::partial_until_last_t<Tpl, OffsetEnd, Pred, TC, FC>>

emp::partial_until_last_t_c<L, template<int_, class...> Tpl, int_ OffsetEnd, Pred, TC = listify, FC = clear<TC>> = unpack<L, mp::partial_until_last_t_c<Tpl, OffsetEnd, Pred, TC, FC>>

<jln/mp/functional/while.hpp>

while_<Pred, F, C = identity>

Return: value

Apply a function while some predicate is satisfied.

Implementation

recursively<if_<Pred, F, stop_recursion>, C>

while_xs<Pred, F, C = listify>

Return: value

Apply a function while some predicate is satisfied.

Implementation

recursively<if_<Pred, F, stop_recursion>, C>

emp::while_<L, Pred, F, C = mp::identity> = unpack<L, mp::while_<Pred, F, C>>

emp::while_xs<L, Pred, F, C = mp::listify> = unpack<L, mp::while_<Pred, F, C>>

Group: group

<jln/mp/algorithm/batched.hpp>

batched_with_c<int_ size, F = listify, C = listify>

Return: sequence

Splits a sequence by arbitrary size group.

Implementation

strided_sliding_with_c<size, size, F, C>

Post-condition

  • If size <= 0, then the result sequence is empty

Semantics

batched_c<2>::f< void, void, int, void, void > = list< list<void, void>, list<int, void>, list<void> >

batched_c<int_ size, C = listify>

batched_with<size, F = listify, C = listify>

Implementation

strided_sliding_with_c<size::value, size::value, F, C>

batched<size, C = listify>

Implementation

strided_sliding_with_c<size::value, size::value, listify, C>

emp::batched_with<L, size, F = mp::listify, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size::value, size::value, F, C>>

emp::batched_with_c<L, int_ size, F = mp::listify, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size, size, F, C>>

emp::batched<L, size, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size::value, size::value, mp::listify, C>>

emp::batched_c<L, int_ size, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size, size, mp::listify, C>>

<jln/mp/algorithm/collapse.hpp>

collapse2_with<C, F, keys...>::f<xs...>

Return: sequence

Groups adjacent elements by adjacent keys.

Pre-condition

  • sizeof...(keys) == sizeof...(xs)

Semantics

collapse_for< 1, 1, 0, 0, 0, 1, 2, 2> ::f<_0, _1, _2, _3, _4, _5, _6, _7> == list< list<_0, _1>, list<_2, _3, _4>, list<_5>, list<_6, _7> >

Note

collapse<list<xs...>>::f<xs...> == group<>::f<xs...>

collapse2_with_c<C, F, int_... keys>

Implementation

collapse2_with<C, F, number<keys>...>

collapse2_c<C, int_... keys>

Implementation

collapse2_with<C, listify, number<keys>...>

collapse2<C, keys...>

Implementation

collapse2_with<C, listify, keys...>

collapse_with<keys, F = listify, C = listify>

collapse<keys, C = listify>

collapse_for<keys...>

Implementation

collapse2_with<listify, listify, keys...>

collapse_for_c<int_... keys>

Implementation

collapse2_with<listify, listify, number<keys>...>

emp::collapse_with<L, keys, F = listify, C = listify> = unpack<L, mp::collapse_with<keys, F, C>>

emp::collapse<L, keys, C = listify> = unpack<L, mp::collapse_with<keys, listify, C>>

emp::collapse_for<L, keys...> = unpack<L, collapse2_with<listify, listify, keys...>>

emp::collapse_for_c<L, int_... keys> = unpack<L, collapse2_with<listify, listify, number<keys>...>>

<jln/mp/algorithm/combine.hpp>

combine<C = listify>::f<xs...>

Return: sequence of list

Computes all possible combinations (with repetition) from the elements in a sequence.

Implementation

repeat_c<sizeof...(xs), product<C>>::f<list<xs...>>

emp::combine<L, C = mp::listify> = unpack<L, mp::combine<C>>

<jln/mp/algorithm/group.hpp>

group_by_with<Cmp, F = listify, C = listify>::f<xs...>

Return: sequence of list

Groups adjacent elements that respect a predicate.

Semantics

group_by<same<>>::f<void, void, int, void> == list< list<void, void>, list<int>, list<void> >

group_with<F = listify, C = listify>

Implementation

group_by_with<same<>, F, C>

group_by<Cmp, C = listify>

Implementation

group_by_with<Cmp, listify, C>

group<C = listify>

Implementation

group_by_with<same<>, listify, C>

emp::group_by_with<L, Cmp, F = listify, C = listify> = unpack<L, mp::group_by_with<Cmp, F, C>>

emp::group_with<L, F = listify, C = listify> = unpack<L, mp::group_by_with<mp::same<>, F, C>>

emp::group_by<L, Cmp, C = listify> = unpack<L, mp::group_by_with<Cmp, listify, C>>

emp::group<L, C = listify> = unpack<L, mp::group_by_with<mp::same<>, listify, C>>

<jln/mp/algorithm/matrix_longest.hpp>

left_matrix_longest_with<FillValue, F = listify, C = listify>::f<seqs...>

Return: sequence

Fills a sequence of typelist to the longest size.

Post-condition

Semantics

left_matrix_longest_with<XX, listify>::f< list<_1, _2>, list<_1, _2, _3>, list<_1, _2>, list<_1, _2, _3, _4> > = list< list<XX, XX, _1, _2>, list<XX, _1, _2, _3>, list<XX, XX, _1, _2>, list<_1, _2, _3, _4> >

left_matrix_longest<FillValue, C = listify>

Implementation

left_matrix_longest_with<FillValue, listify, C>

right_matrix_longest_with<FillValue, F = listify, C = listify>::f<seqs...>

Return: sequence

Fills a sequence of typelist to the longest size.

Post-condition

Semantics

right_matrix_longest_with_matrix_longest_with<XX, listify>::f< list<_1, _2>, list<_1, _2, _3>, list<_1, _2>, list<_1, _2, _3, _4> > = list< list<_1, _2, XX, XX>, list<_1, _2, _3, XX>, list<_1, _2, XX, XX>, list<_1, _2, _3, _4> >

right_matrix_longest<FillValue, C = listify>

Implementation

right_matrix_longest_with<FillValue, listify, C>

emp::left_matrix_longest_with<L, FillValue, F = mp::listify, C = mp::listify> = unpack<L, mp::left_matrix_longest_with<FillValue, F, C>>

emp::left_matrix_longest<L, FillValue, C = mp::listify> = unpack<L, mp::left_matrix_longest<FillValue, C>>

emp::right_matrix_longest_with<L, FillValue, F = mp::listify, C = mp::listify> = unpack<L, mp::right_matrix_longest_with<FillValue, F, C>>

emp::right_matrix_longest<L, FillValue, C = mp::listify> = unpack<L, mp::right_matrix_longest<FillValue, C>>

<jln/mp/algorithm/matrix_shortest.hpp>

left_matrix_shortest_with<F = listify, C = listify>::f<seqs...>

Return: sequence

Truncates a sequence of typelist to the smallest size.

Post-condition

Semantics

left_matrix_shortest_with<listify>::f< list<_1, _2>, list<_1, _2, _3>, list<_1, _2>, list<_1, _2, _3, _4> > = list< list<_1, _2>, list<_1, _2>, list<_1, _2>, list<_1, _2> >

left_matrix_shortest<C = listify>

right_matrix_shortest_with<F = listify, C = listify>::f<seqs...>

Return: sequence

Truncates a sequence of typelist to the smallest size.

Post-condition

Semantics

right_matrix_shortest_with<listify>::f< list<_1, _2>, list<_1, _2, _3>, list<_1, _2>, list<_1, _2, _3, _4> > = list< list<_1, _2>, list<_2, _3>, list<_1, _2>, list<_3, _4> >

right_matrix_shortest<C = listify>

emp::left_matrix_shortest_with<L, F = mp::listify, C = mp::listify> = unpack<L, mp::left_matrix_shortest_with<F, C>>

emp::left_matrix_shortest<L, C = mp::listify> = unpack<L, mp::left_matrix_shortest<C>>

emp::right_matrix_shortest_with<L, F = mp::listify, C = mp::listify> = unpack<L, mp::right_matrix_shortest_with<F, C>>

emp::right_matrix_shortest<L, C = mp::listify> = unpack<L, mp::right_matrix_shortest<C>>

<jln/mp/algorithm/pairwise.hpp>

pairwise_with<F = listify, C = listify>::f<xs...>

Return: sequence of list

Returns successive overlapping pairs.

Post-condition

  • If sizeof...(xs) <= 1, then the result sequence is empty
  • If sizeof...(xs) > 1, then the number of 2-tuples is sizeof...(xs) - 1

Semantics

pairwise<>::f<a, b, c, d> == list< list<a, b>, list<b, c>, list<c, d> >

pairwise<C = listify>

Implementation

pairwise_with<listify, C>

emp::pairwise_with<L, F = mp::listify, C = mp::listify> = unpack<L, mp::pairwise_with<F, C>>

emp::pairwise<L, C = mp::listify> = unpack<L, mp::pairwise<C>>

<jln/mp/algorithm/partition.hpp>

partition_with<Pred, F = listify, C = listify>::f<xs...>

Return: sequence of two values

Splits a list in two according to a predicate.

The first value contains all elements for which the predicate returns true, the second value contains all elements for which predicate returns false

Implementation

transform<Pred, /*...*/>::f<xs...>::g<C::f, identity::f, xs...>

partition<Pred, C = listify>

Return: sequence of two lists

Splits a list in two according to a predicate.

The first value contains all elements for which the predicate returns true, the second value contains all elements for which predicate returns false

Implementation

partition_with<Pred, listify, C>

emp::partition_with<L, Pred, F = mp::listify, C = mp::listify> = unpack<L, mp::partition_with<Pred, F, C>>

emp::partition<L, Pred, C = mp::listify> = unpack<L, mp::partition<Pred, C>>

<jln/mp/algorithm/permutations.hpp>

permutations<C = listify>::f<xs...>

Return: sequence of list

Generates all permutations of sequence.

Post-condition

  • sizeof...(result) == sizeof...(xs)!

emp::permutations<L, C = listify> = unpack<L, mp::permutations<C>>

<jln/mp/algorithm/powerset.hpp>

powerset<C = listify>::f<xs...>

Return: sequence of list

Computes the powerset of a sequence.

Semantics

powerset<>::f<a, b, c> == list< list<>, list<a>, list<b>, list<a, b>, list<c>, list<a, c>, list<b, c>, list<a, b, c> >

emp::powerset<L, C = mp::listify> = unpack<L, mp::powerset<C>>

<jln/mp/algorithm/product.hpp>

product<C = listify>::f<seq = list<>, seqs...>

Return: sequence

Computes the cartesian product of lists.

Pre-condition

Post-condition

  • sizeof...(result) == (emp::size<seqs> * ...) if sizeof...(xs) != 0 else 0

Semantics

call<product<listify>, list<_0, _1, _2>, list<_3, _4>, list<_5> > = list< list<_0, _3, _5>, list<_0, _4, _5>, list<_1, _3, _5>, list<_1, _4, _5>, list<_2, _3, _5>, list<_2, _4, _5> >

emp::product<L, C = mp::listify> = unpack<L, product<C>>

<jln/mp/algorithm/regroup.hpp>

regroup_with<F, C = listify>

Return: sequence of list of type and number

Group identical type together.

Elements are sorted in order of first appearance.

Implementation

counter_wrapped_with</*...*/, C>

Semantics

regroup_with<listify>::f<int, int, char, double, int, double> == list< list<int, int, int>, list<char>, list<double, double> >

regroup<C = listify>

Implementation

regroup_with<listify, C>

regroup_by_with<Cmp = same<>, F = listify, C = listify>::f<xs...>

Implementation

unique_if<Cmp, lift</*...*/>>::f<xs...>::f<C, F, Cmp, xs...>

regroup_by<Cmp = same<>, C = listify>

Implementation

regroup_by_with<Cmp, listify, C>

emp::regroup<L, C = mp::listify> = unpack<L, mp::regroup<C>>

emp::regroup_with<L, F = mp::listify, C = mp::listify> = unpack<L, mp::regroup_with<F, C>>

emp::regroup_by<L, Cmp = mp::same<>, C = mp::listify> = unpack<L, mp::regroup_by<Cmp, C>>

emp::regroup_by_with<L, Cmp = mp::same<>, F = mp::listify, C = mp::listify> = unpack<L, mp::regroup_by_with<Cmp, F, C>>

<jln/mp/algorithm/split_after.hpp>

split_after_if_with<Pred, F = listify, C = listify>::f<xs...>

Return: sequence

Splits a sequence into multiple lists at every point that satisfy a predicate.

The separator value is inserted at the end of the previous list.

Semantics

split_after_if<is<_0>>::f<_0, _1, _2, _0, _3> == list< list<_0>, list<_1, _2, _0>, list<_3> >

split_after_if<Pred = identity, C = listify>

Implementation

split_after_if_with<Pred, listify, C>

split_after_with<x, F = listify, C = listify>

Implementation

split_after_if_with<is<x>, F, C>

split_after<x, C = listify>

Implementation

split_after_if_with<is<x>, listify, C>

emp::split_after_if_with<L, Pred = mp::identity, F = listify, C = listify> = unpack<L, mp::split_after_if_with<Pred, F, C>>

emp::split_after_if<L, Pred = mp::identity, C = listify> = unpack<L, mp::split_after_if_with<Pred, listify, C>>

emp::split_after_with<L, x, F = listify, C = listify> = unpack<L, mp::split_after_if_with<is<x>, F, C>>

emp::split_after<L, x, C = listify> = unpack<L, mp::split_after_if_with<is<x>, listify, C>>

<jln/mp/algorithm/split_at.hpp>

split_at2_with_c<unsigned i, SubC1 = listify, SubC2 = SubC1, C = listify>::f<xs...>

Return: sequence of two values

Splits a sequence at an arbitrary position.

Pre-condition

  • i >= 0 && i <= sizeof...(xs)

split_at2_with<i, SubC1 = listify, SubC2 = SubC1, C = listify>

Implementation

split_at2_with_c<i::value, SubC1, SubC2, C>

split_at_with_c<unsigned i, F = listify, C = listify>

Implementation

split_at2_with_c<i, F, F, C>

split_at_with<i, F = listify, C = listify>

Implementation

split_at2_with_c<i::value, F, F, C>

split_at_c<unsigned i, C = listify>

Return: sequence of two lists

Splits a sequence at an arbitrary position.

Implementation

split_at2_with_c<i, listify, listify, C>

Pre-condition

  • i >= 0 && i <= sizeof...(xs)

split_at<i, C = listify>

Implementation

split_at2_with_c<i::value, listify, listify, C>

emp::split_at2_with<L, i, SubC1 = mp::listify, SubC2 = mp::listify, C = mp::listify> = unpack<L, mp::split_at2_with_c<i::value, SubC1, SubC2, C>>

emp::split_at2_with_c<L, unsigned i, SubC1 = mp::listify, SubC2 = mp::listify, C = mp::listify> = unpack<L, mp::split_at2_with_c<i, SubC1, SubC2, C>>

emp::split_at_with<L, i, F = mp::listify, C = mp::listify> = unpack<L, mp::split_at2_with_c<i::value, F, F, C>>

emp::split_at_with_c<L, unsigned i, F = mp::listify, C = mp::listify> = unpack<L, mp::split_at2_with_c<i, F, F, C>>

emp::split_at<L, i, C = mp::listify> = unpack<L, mp::split_at2_with_c<i::value, listify, listify, C>>

emp::split_at_c<L, unsigned i, C = mp::listify> = unpack<L, mp::split_at2_with_c<i, listify, listify, C>>

<jln/mp/algorithm/split_before.hpp>

split_before_if_with<Pred, F = listify, C = listify>::f<xs...>

Return: sequence

Splits a sequence into multiple lists at every point that satisfy a predicate.

The separator value is inserted at the beginning of the following list.

Semantics

split_before_if<is<_0>>::f<_0, _1, _2, _0, _3> == list< list<>, list<_0, _1, _2>, list<_0, _3> >

split_before_if<Pred = identity, C = listify>

Implementation

split_before_if_with<Pred, listify, C>

split_before_with<x, F = listify, C = listify>

Implementation

split_before_if_with<is<x>, F, C>

split_before<x, C = listify>

Implementation

split_before_if_with<is<x>, listify, C>

emp::split_before_if_with<L, Pred = mp::identity, F = listify, C = listify> = unpack<L, mp::split_before_if_with<Pred, F, C>>

emp::split_before_if<L, Pred = mp::identity, C = listify> = unpack<L, mp::split_before_if_with<Pred, listify, C>>

emp::split_before_with<L, x, F = listify, C = listify> = unpack<L, mp::split_before_if_with<is<x>, F, C>>

emp::split_before<L, x, C = listify> = unpack<L, mp::split_before_if_with<is<x>, listify, C>>

<jln/mp/algorithm/split_from.hpp>

split_from2<GetIndex, SubC1 = listify, SubC2 = SubC1, C = listify>::f<xs...>

Return: sequence of two values

Splits a sequence at an arbitrary position returns by GetIndex.

Implementation

split_at2_with_c<GetIndex::f<xs...>::value, SubC1, SubC2, C>::f<xs...>

Pre-condition

  • GetIndex::f<xs...>::value >= 0 && GetIndex::f<xs...>::value <= sizeof...(xs)

split_from<GetIndex, C = listify>

Implementation

split_from2<GetIndex, listify, listify, C>

emp::split_from2<L, GetIndex, SubC1 = mp::listify, SubC2 = SubC1, C = mp::listify> = unpack<L, mp::split_from2<GetIndex, SubC1, SubC2, C>>

emp::split_from<L, GetIndex, C = mp::listify> = unpack<L, mp::split_from2<GetIndex, mp::listify, mp::listify, C>>

<jln/mp/algorithm/split.hpp>

split_if_with<Pred = identity, F = listify, C = listify>::f<xs...>

Return: sequence

Splits a sequence into multiple lists at every point that satisfy a predicate.

The separator value is removed.

Semantics

split_if<is<_0>>::f<_0, _1, _2, _0, _3> == list< list<>, list<_1, _2>, list<_3> >

split_if<Pred = identity, C = listify>

Implementation

split_if_with<Pred, listify, C>

split_with<x, F = listify, C = listify>

Implementation

split_if_with<is<x>, F, C>

split<x, C = listify>

Implementation

split_if_with<is<x>, listify, C>

emp::split_if_with<L, Pred = mp::identity, F = listify, C = listify> = unpack<L, mp::split_if_with<Pred, F, C>>

emp::split_if<L, Pred = mp::identity, C = listify> = unpack<L, mp::split_if_with<Pred, listify, C>>

emp::split_with<L, x, F = listify, C = listify> = unpack<L, mp::split_if_with<is<x>, F, C>>

emp::split<L, x, C = listify> = unpack<L, mp::split_if_with<is<x>, listify, C>>

<jln/mp/algorithm/split_keep_separator.hpp>

split_keep_separator_if_with<Pred = identity, F = listify, C = listify>::f<xs...>

Return: sequence of list

Splits a sequence into multiple lists at every point that satisfy a predicate.

The separator value is inserted in a new list.

Semantics

split_keep_separator_if<is<_0>>::f<_0, _1, _2, _0, _3> == list< list<>, list<_0>, list<_1, _2>, list<_0>, list<_3> >

split_keep_separator_if<Pred = identity, C = listify>

Implementation

split_keep_separator_if_with<Pred, listify, C>

split_keep_separator_with<x, F = listify, C = listify>

Implementation

split_keep_separator_if_with<is<x>, F, C>

split_keep_separator<x, C = listify>

Implementation

split_keep_separator_if_with<is<x>, listify, C>

emp::split_keep_separator_if_with<L, Pred = mp::identity, F = listify, C = listify> = unpack<L, mp::split_keep_separator_if_with<Pred, F, C>>

emp::split_keep_separator_if<L, Pred = mp::identity, C = listify> = unpack<L, mp::split_keep_separator_if_with<Pred, listify, C>>

emp::split_keep_separator_with<L, x, F = listify, C = listify> = unpack<L, mp::split_keep_separator_if_with<is<x>, F, C>>

emp::split_keep_separator<L, x, C = listify> = unpack<L, mp::split_keep_separator_if_with<is<x>, listify, C>>

<jln/mp/algorithm/split_once.hpp>

split_once_if<Pred, TC = listify, FC = clear<>>::f<xs...>

Return: sequence of two or zero sequence

Splits a sequence at the first position that satisfy a predicate.

split_once<x, TC = listify, FC = clear<>>

Implementation

split_once_if<is<x>, TC, FC>

emp::split_once_if<L, Pred, TC = listify, FC = clear<>> = unpack<L, mp::split_once_if<Pred, TC, FC>>

emp::split_once<L, x, TC = listify, FC = clear<>> = unpack<L, mp::split_once_if<is<x>, TC, FC>>

<jln/mp/algorithm/zip_longest.hpp>

zip_longest<FillValue, C = listify>

Return: sequence of list

Turns rows into columns, and columns into rows.

Missing values are filled-in with fillvalue. This is similar to transposing a matrix.

Implementation

right_matrix_longest<FillValue, zip<C>>

Semantics

zip_longest<_0>::f< list<_1, _2, _3>, list<_a, _b, _c, _d> > = list< list<_1, _a>, list<_2, _b>, list<_3, _c> list<_0, _d> >

zip_longest_with<FillValue, F = listify, C = listify>

Implementation

right_matrix_longest<FillValue, zip_with<F, C>>

emp::zip_longest<L, FillValue, C = mp::listify> = unpack<L, mp::zip_longest<FillValue, C>>

emp::zip_longest_with<L, FillValue, F = mp::listify, C = mp::listify> = unpack<L, mp::zip_longest_with<FillValue, F, C>>

<jln/mp/algorithm/zip.hpp>

zip_with<F = listify, C = listify>::f<seqs...>

Return: sequence of list

Turns rows into columns, and columns into rows.

This is similar to transposing a matrix.

Pre-condition

  • all parameters must be lists
  • all lists must be the same size

Semantics

zip<>::f< list<_1, _2, _3>, list<_a, _b, _c> > = list< list<_1, _a>, list<_2, _b>, list<_3, _c> >

zip<C = listify>

Implementation

zip_with<listify, C>

emp::zip<L, C = mp::listify> = unpack<L, mp::zip<C>>

emp::zip_with<L, F = mp::listify, C = mp::listify> = unpack<L, mp::zip_with<F, C>>

Group: list

<jln/mp/list/append.hpp>

append<L, C = listify>

Return: sequence

Inserts elements at the end of L list.

Implementation

push_front<L, unpack_append<C>>

emp::append<L, xs...> = unpack_append<L, listify, xs...>

<jln/mp/list/as_list.hpp>

as_list<C = identity>::f<seq>

Return: list

Extracts type paramaters of a template class or union, then constructs a list.

Implementation

C::f</*...*/>

Pre-condition

  • seq must be compatible with typelist or detail::_as_list<seq>::type.

emp::as_list<seq, C = mp::identity> = as_list<C>::f<seq>

<jln/mp/list/at.hpp>

at<N, C = identity>

Return: value

Retrieves an element of a sequence at an arbitrary position.

Implementation

drop_front<N, front<C>>

Pre-condition

  • 0 <= N < sizeof...(xs)

at_c<unsigned n, C = identity>

Implementation

drop_front_c<n, front<C>>

at0<C = identity>

Implementation

front<C>

at1<C = identity>

Implementation

drop_front_c<1, front<C>>

at2<C = identity>

Implementation

drop_front_c<2, front<C>>

at3<C = identity>

Implementation

drop_front_c<3, front<C>>

at4<C = identity>

Implementation

drop_front_c<4, front<C>>

at5<C = identity>

Implementation

drop_front_c<5, front<C>>

at6<C = identity>

Implementation

drop_front_c<6, front<C>>

at7<C = identity>

Implementation

drop_front_c<7, front<C>>

at8<C = identity>

Implementation

drop_front_c<8, front<C>>

at9<C = identity>

Implementation

drop_front_c<9, front<C>>

emp::at<L, i, C = mp::identity> = unpack<L, mp::drop_front_c<i::value, mp::front<C>>>

emp::at_c<L, unsigned i, C = mp::identity> = unpack<L, mp::drop_front_c<i, mp::front<C>>>

emp::at0<L, C = mp::identity> = unpack<L, mp::front<C>>

emp::at1<L, C = mp::identity> = unpack<L, mp::drop_front_c<1, mp::front<C>>>

emp::at2<L, C = mp::identity> = unpack<L, mp::drop_front_c<2, mp::front<C>>>

emp::at3<L, C = mp::identity> = unpack<L, mp::drop_front_c<3, mp::front<C>>>

emp::at4<L, C = mp::identity> = unpack<L, mp::drop_front_c<4, mp::front<C>>>

emp::at5<L, C = mp::identity> = unpack<L, mp::drop_front_c<5, mp::front<C>>>

emp::at6<L, C = mp::identity> = unpack<L, mp::drop_front_c<6, mp::front<C>>>

emp::at7<L, C = mp::identity> = unpack<L, mp::drop_front_c<7, mp::front<C>>>

emp::at8<L, C = mp::identity> = unpack<L, mp::drop_front_c<8, mp::front<C>>>

emp::at9<L, C = mp::identity> = unpack<L, mp::drop_front_c<9, mp::front<C>>>

<jln/mp/list/back.hpp>

back<C = identity>

Return: value

Retrieves the last element of a sequence.

Implementation

rotate_c<-1, front<C>>

emp::back<L, C = mp::identity> = unpack<L, mp::back<C>>

<jln/mp/list/lookup.hpp>

build_indexed_v<xs...>::f<int i>

Constructs an indexable sequence in O(1).

Pre-condition

  • 0 <= i < sizeof...(xs)

build_indexed<xs...>::f<i>

Constructs an indexable sequence in O(1).

If possible prefer the use of build_indexed_v

Pre-condition

  • 0 <= i::value < sizeof...(xs)

emp::build_indexed_v<L> = unpack<L, lift<mp::build_indexed_v>>

emp::build_indexed<L> = unpack<L, lift<mp::build_indexed>>

emp::lookup_c<L, int i> = unpack<L, mp::lift<mp::build_indexed_v>>::f<i>

emp::lookup<L, I> = unpack<L, mp::lift<mp::build_indexed_v>>::f<I::value>

emp::indexed_lookup_c<IndexedV, int i> = IndexedV::f<i>

emp::indexed_lookup<IndexedV, I> = IndexedV::f<I::value>

<jln/mp/list/clear.hpp>

clear<C = listify>::f<xs...>

Return: value

Removes all elements from the sequence.

Implementation

C::f<>

<jln/mp/list/drop_back.hpp>

drop_back_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Removes N elements from the end of a sequence.

Pre-condition

  • 0 <= N <= sizeof...(xs)

drop_back_max_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Removes at most N elements from the end of a sequence.

Implementation

take_front_c<sizeof...(xs) <= N ? 0 : sizeof...(xs) - N, C>::f<xs...>

Pre-condition

  • 0 <= N

drop_back<N, C = listify>

Implementation

drop_back_c<N::value, C>

drop_back_max<N, C = listify>

Implementation

drop_back_max_c<N::value, C>

emp::drop_back<L, N, C = mp::listify> = unpack<L, mp::drop_back<N, C>>

emp::drop_back_c<L, int_ n, C = mp::listify> = unpack<L, mp::drop_back_c<n, C>>

emp::drop_back_max<L, N, C = mp::listify> = unpack<L, mp::drop_back_max<N, C>>

emp::drop_back_max_c<L, int_ n, C = mp::listify> = unpack<L, mp::drop_back_max_c<n, C>>

<jln/mp/list/drop_front.hpp>

drop_front_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Removes N elements from the beginning of a sequence.

Pre-condition

  • 0 <= N <= sizeof...(xs)

drop_front_max_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Removes at most N elements from the beginning of a sequence.

Pre-condition

  • 0 <= N

drop_front<N, C = listify>

Implementation

drop_front_c<N::value, C>

drop_front_max<N, C = listify>

Implementation

drop_front_max_c<N::value, C>

emp::drop_front<L, N, C = mp::listify> = unpack<L, mp::drop_front<N, C>>

emp::drop_front_c<L, unsigned n, C = mp::listify> = unpack<L, mp::drop_front_c<n, C>>

emp::drop_front_max<L, N, C = mp::listify> = unpack<L, mp::drop_front_max<N, C>>

emp::drop_front_max_c<L, unsigned n, C = mp::listify> = unpack<L, mp::drop_front_max_c<n, C>>

<jln/mp/list/enumerate.hpp>

enumerate_v_with<F, C = listify>::f<xs...>

Return: sequence

Returns pairs containing a numeric index of type int_ and a value.

Implementation

JLN_MP_MAKE_INTEGER_SEQUENCE(sizeof...(xs), /*...*/)::f<F, C, xs...>

Semantics

C::f<F::f<0, xs[0]>, ..., F::f<n, xs[n]>>

enumerate_with<F = listify, C = listify>::f<xs...>

Return: sequence

Returns pairs containing an index and a value.

Semantics

C::f<F::f<number<0>, xs[0]>, ..., F::f<number<n>, xs[n]>>

enumerate<C = listify>

Implementation

enumerate_with<listify, C>

emp::enumerate_v_with<L, F, C = mp::listify> = unpack<L, mp::enumerate_v_with<F, C>>

emp::enumerate_with<L, F = mp::listify, C = mp::listify> = unpack<L, mp::enumerate_with<F, C>>

emp::enumerate<L, C = mp::listify> = unpack<L, mp::enumerate_with<mp::listify, C>>

<jln/mp/list/erase.hpp>

erase_c<int_ start, unsigned size = 1, C = listify>::f<xs...>

Return: sequence

Removes at most size elements from index start.

A negative value represents an index starting from the end.

erase<start, size = number<1>, C = listify>

Implementation

erase_c<start::value, size::value, C>

emp::erase<L, start, size = mp::number<1>, C = mp::listify> = unpack<L, mp::erase<start, size, C>>

emp::erase_c<L, int_ start, unsigned size = 1, C = mp::listify> = unpack<L, mp::erase_c<start, size, C>>

<jln/mp/list/front.hpp>

front<C = identity>::f<x, xs...>

Return: value

Retrieves the first element of a sequence.

Implementation

C::f<x>

emp::front<L, C = mp::identity> = unpack<L, front<C>>

<jln/mp/list/insert.hpp>

insert_c<int_ index, x, C = listify>

Return: sequence

Inserts an elements at an arbitrary position.

Implementation

insert_sequence_c<index, list<x>, C>

insert<index, x, C = listify>

Implementation

insert_sequence_c<index::value, list<x>, C>

emp::insert<L, index, x, C = mp::listify> = unpack<L, mp::insert<index, x, C>>

emp::insert_c<L, int_ index, x, C = mp::listify> = unpack<L, mp::insert_c<index, x, C>>

<jln/mp/list/insert_sequence.hpp>

insert_sequence_c<int_ index, seq, C = listify>

Return: sequence

Inserts all elements of seq at an arbitrary position.

A negative value represents an index starting from the end.

insert_sequence_c<index, List<xs...>, C>::f<ys...>

insert_sequence<index, seq, C = listify>

Implementation

insert_sequence_c<index::value, seq, C>

emp::insert_sequence<L, index, seq, C = mp::listify> = unpack<L, mp::insert_sequence<index, seq, C>>

emp::insert_sequence_c<L, int_ index, seq, C = mp::listify> = unpack<L, mp::insert_sequence_c<index, seq, C>>

<jln/mp/list/is_empty.hpp>

is_empty<C = identity>

Return: true_ / false_

Checks whether a sequence has no elements.

Implementation

size<not_<C>>

emp::is_empty<L, C = mp::identity> = unpack<L, mp::is_empty<C>>

bool emp::is_empty_v<L, C = mp::identity> = unpack<L, mp::is_empty<C>>::value

<jln/mp/list/is_list.hpp>

is_list<C = identity>::f<x>

Return: true_ / false_

Checks whether x is a list.

Implementation

C::f<number<emp::is_list_v<x>>>

bool emp::is_list_v<x> = false

emp::is_list<x, C = mp::identity> = C::f<number<emp::is_list_v<x>>>

<jln/mp/list/is_not_empty.hpp>

is_not_empty<C = identity>

Return: true_ / false_

Checks whether a sequence has elements.

Implementation

size<is<number<0>, not_<C>>>

emp::is_not_empty<L, C = mp::identity> = unpack<L, mp::is_not_empty<C>>

bool emp::is_not_empty_v<L, C = mp::identity> = unpack<L, mp::is_not_empty<C>>::value

<jln/mp/list/is_size_of.hpp>

is_size_of<N, C = identity>

Implementation

size<is<N, C>>

is_size_of_c<int_ n, C = identity>

Implementation

size<is<number<n>, C>>

emp::is_size_of<L, N, C = mp::identity> = unpack<L, mp::is_size_of<N, C>>

emp::is_size_of_c<L, int_ n, C = mp::identity> = unpack<L, mp::is_size_of_c<n, C>>

bool emp::is_size_of_v<L, N, C = mp::identity> = unpack<L, mp::is_size_of<N, C>>::value

bool emp::is_size_of_c_v<L, int_ n, C = mp::identity> = unpack<L, mp::is_size_of_c<n, C>>::value

<jln/mp/list/join.hpp>

join<C = listify>::f<seqs...>

Return: sequence

Concatenates lists.

Pre-condition

emp::join<seqs...> = mp::join<>::f<seqs...>

<jln/mp/list/list.hpp>

list<xs...>

<jln/mp/list/listify.hpp>

listify

Return: list

Implementation

lift<list>

<jln/mp/list/offset.hpp>

offset_c<int_ I, C = identity>::f<xs...>

Return: number

Difference between the number of parameter xs and I::value.

Implementation

C::f<number<I - int_(sizeof...(xs))>>

Semantics

Equivalent to size<push_front<I, sub<C>>>

offset<I, C = identity>

Implementation

offset_c<I::value, C>

emp::offset<L, I, C = mp::identity> = unpack<L, mp::offset<I, C>>

emp::offset_c<L, int_ i, C = mp::identity> = unpack<L, mp::offset_c<i, C>>

int_ emp::offset_v<L, I, C = mp::identity> = unpack<L, mp::offset<I, C>>::value

int_ emp::offset_c_v<L, int_ i, C = mp::identity> = unpack<L, mp::offset_c<i, C>>::value

<jln/mp/list/pop_back.hpp>

pop_back<C = listify>

Return: sequence

Removes the last element of sequence.

Implementation

rotate_c<-1, pop_front<C>>

Pre-condition

  • sizeof...(xs) > 0

emp::pop_back<L, C = mp::listify> = unpack<L, mp::pop_back<C>>

<jln/mp/list/pop_front.hpp>

pop_front<C = listify>

Return: sequence

Remove the first element of sequence

Implementation

drop_front_c<1, C>

Pre-condition

  • sizeof...(xs) > 0

emp::pop_front<L, C = mp::listify> = drop_front_c<L, 1, C>

<jln/mp/list/prepend.hpp>

prepend<L, C = listify>

Return: sequence

Inserts elements at the start of L list.

Implementation

push_front<L, unpack<C>>

emp::prepend<L, xs...> = unpack<L, listify, xs...>

<jln/mp/list/push_back.hpp>

push_back<x, C = listify>::f<xs...>

Return: sequence

Appends x to the end of the sequence.

Implementation

C::f<xs..., x>

emp::push_back<L, T, C = mp::listify> = unpack<L, mp::push_back<T, C>>

<jln/mp/list/push_front.hpp>

push_front<x, C = listify>::f<xs...>

Return: sequence

Appends x to the beginning of the sequence.

Implementation

C::f<x, xs...>

emp::push_front<L, T, C = mp::listify> = unpack<L, mp::push_front<T, C>>

<jln/mp/list/range.hpp>

range_c<int_ beg, int_ end, C = listify>::f<xs...>

Return: sequence

Returns a contiguous subsequence of a sequence.

A negative value represents an index starting from the end. All indices available in the range are returned, indices outside the bounds are ignored.

range<beg, end, C = listify>

Implementation

range_c<beg::value, end::value, C>

emp::range<L, beg, end, C = mp::listify> = unpack<L, mp::range<beg, end, C>>

emp::range_c<L, int_ beg, int_ end, C = mp::listify> = unpack<L, mp::range_c<beg, end, C>>

<jln/mp/list/size.hpp>

size<C = identity>::f<xs...>

Return: number

Returns the number of elements in a xs.

Implementation

C::f<number<sizeof...(xs)>>

emp::size<L, C = mp::identity> = unpack<L, mp::size<C>>

bool emp::size_v<L, C = mp::identity> = unpack<L, mp::size<C>>::value

<jln/mp/list/slice.hpp>

strided_slice_c<int_ start, unsigned count, unsigned step = 1, C = listify>::f<xs...>

Return: sequence

Returns a subset of elements in a xs picked at regular intervals in range.

A negative start represents an index starting from the end.

Pre-condition

strided_slice<start, count, step = number<1>, C = listify>

Implementation

strided_slice_c<start::value, count::value, step::value, C>

slice_c<int_ start, unsigned count, C = listify>

Implementation

strided_slice_c<start, count, 1, C>

slice<start, count, C = listify>

Implementation

strided_slice_c<start::value, count::value, 1, C>

emp::strided_slice<L, start, count, step = number<1>, C = mp::listify> = unpack<L, strided_slice<start, count, step, C>>

emp::strided_slice_c<L, int_ start, unsigned count, unsigned step = 1, C = mp::listify> = unpack<L, mp::strided_slice_c<start, count, step, C>>

emp::slice<L, start, count, C = mp::listify> = unpack<L, mp::strided_slice_c<start::value, count::value, 1, C>>

emp::slice_c<L, int_ start, unsigned count, C = mp::listify> = unpack<L, mp::strided_slice_c<start, count, 1, C>>

<jln/mp/list/sliding.hpp>

strided_sliding_with_c<int_ size, int_ stride = 1, F = listify, C = listify>

Return: sequence of list Given a sequence and a count n, place a window over the first n elements of the underlying range. Return the contents of that window as the first element of the adapted range, then slide the window forward one element at a time until hitting the end of the underlying range.

Returns sliding windows of width size.

Pre-condition

  • stride != 0
  • size >= 0

Semantics

If stride < 0, then stride = stride + size If sizeof...(xs) < size, then f = C::f<xs...> If stride > 1, the last window may be smaller than size If stride == 0 || size <= 0, then the result sequence is empty strided_sliding_with_c<3, 1, F, C>::f<_0, _1, _2, _3, _4> == C::f<F::f<_0, _1, _2>, F::f<_1, _2, _3>, F::f<_2, _3, _4>> strided_sliding_with_c<3, 2, F, C>::f<_0, _1, _2, _3, _4> == C::f<F::f<_0, _1, _2>, F::f<_2, _3, _4>>

strided_sliding_with<size, stride = number<1>, F = listify, C = listify>

Implementation

strided_sliding_with_c<size::value, stride::value, F, C>

strided_sliding<size, stride = number<1>, C = listify>

Implementation

strided_sliding_with_c<size::value, stride::value, listify, C>

strided_sliding_c<int_ size, int_ stride = 1, C = listify>

Implementation

strided_sliding_with_c<size, stride, listify, C>

sliding_with<size, F = listify, C = listify>

Implementation

strided_sliding_with_c<size::value, 1, F, C>

sliding_with_c<int_ size, F = listify, C = listify>

Implementation

strided_sliding_with_c<size, 1, F, C>

sliding<size, C = listify>

Implementation

strided_sliding_with_c<size::value, 1, listify, C>

sliding_c<int_ size, C = listify>

Implementation

strided_sliding_with_c<size, 1, listify, C>

emp::strided_sliding_with<L, size, stride = number<1>, F = listify, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size::value, stride::value, F, C>>

emp::strided_sliding_with_c<L, int_ size, int_ stride = 1, F = listify, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size, stride, F, C>>

emp::strided_sliding<L, size, stride = number<1>, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size::value, stride::value, listify, C>>

emp::strided_sliding_c<L, int_ size, int_ stride = 1, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size, stride, listify, C>>

emp::sliding_with<L, size, F = listify, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size::value, 1, F, C>>

emp::sliding_with_c<L, int_ size, F = listify, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size, 1, F, C>>

emp::sliding<L, size, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size::value, 1, listify, C>>

emp::sliding_c<L, int_ size, C = mp::listify> = unpack<L, mp::strided_sliding_with_c<size, 1, listify, C>>

<jln/mp/list/swap_index.hpp>

swap_index_c<unsigned i, unsigned j, C = listify>

Return: sequence

Swap elements at indexes i and j of a sequence.

Pre-condition

  • 0 < i < sizeof...(xs)
  • 0 < j < sizeof...(xs)

Note

swap_index<I, J> == swap_index<J, I>

swap_index<I, J, C = listify>

Implementation

swap_index_c<I::value, J::value, C>

emp::swap_index<L, I, J, C = mp::listify> = unpack<L, swap_index<I, J, C>>

emp::swap_index_c<L, unsigned i, unsigned j, C = mp::listify> = unpack<L, swap_index_c<i, j, C>>

<jln/mp/list/take_back.hpp>

take_back_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Extracts N elements from the end of a sequence.

Implementation

drop_front_c<sizeof...(xs) - N, C>::f<xs...>

Pre-condition

  • 0 <= N <= sizeof...(xs)

take_back_max_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Extracts at most N elements from the end of a sequence.

Implementation

drop_front_c<sizeof...(xs) <= N ? 0 : sizeof...(xs) - N, C>::f<xs...>

Pre-condition

  • 0 <= N

take_back<N, C = listify>

Implementation

take_back_c<N::value, C>

take_back_max<N, C = listify>

Implementation

take_back_max_c<N::value, C>

emp::take_back<L, N, C = mp::listify> = unpack<L, mp::take_back<N, C>>

emp::take_back_c<L, int_ n, C = mp::listify> = unpack<L, mp::take_back_c<n, C>>

emp::take_back_max<L, N, C = mp::listify> = unpack<L, mp::take_back_max<N, C>>

emp::take_back_max_c<L, int_ n, C = mp::listify> = unpack<L, mp::take_back_max_c<n, C>>

<jln/mp/list/take_front.hpp>

take_front_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Extracts N elements from the beginning of a sequence.

Pre-condition

  • 0 <= N <= sizeof...(xs)

take_front_max_c<unsigned N, C = listify>::f<xs...>

Return: sequence

Extracts at most N elements from the beginning of a sequence.

Implementation

conditional_c<sizeof...(xs) <= N>::f<C, take_front_c<N, C>>::f<xs...>

Pre-condition

  • 0 <= N

take_front<N, C = listify>

Implementation

take_front_c<N::value, C>

take_front_max<N, C = listify>

Implementation

take_front_max_c<N::value, C>

emp::take_front<L, N, C = mp::listify> = unpack<L, mp::take_front<N, C>>

emp::take_front_c<L, int_ n, C = mp::listify> = unpack<L, mp::take_front_c<n, C>>

emp::take_front_max<L, N, C = mp::listify> = unpack<L, mp::take_front_max<N, C>>

emp::take_front_max_c<L, int_ n, C = mp::listify> = unpack<L, mp::take_front_max_c<n, C>>

<jln/mp/list/wrap_in_list.hpp>

wrap_in_list_if<Pred>

Return: list

Returns a list with the first element if the predicate is checked, otherwise returns a empty list.

Pre-condition

  • Pred<xs...>::value must be narrowing convertible to bool

wrap_in_list_if_not<Pred>

Return: list

Returns a list with the first element if the predicate is not checked, otherwise returns a empty list.

Pre-condition

  • Pred<xs...>::value must be narrowing convertible to bool

wrap_in_list_c<bool b>

wrap_in_list_c<true>::f<xs...>

Implementation

list<xs...>

wrap_in_list_c<false>::f<xs...>

Implementation

list<>

wrap_in_list<b>

Implementation

wrap_in_list_c<b::value>

emp::wrap_in_list_if<Pred, xs...> = mp::wrap_in_list_if<Pred>::f<xs...>

emp::wrap_in_list_if_not<Pred, xs...> = mp::wrap_in_list_if_not<Pred>::f<xs...>

emp::wrap_in_list<b, xs...> = mp::wrap_in_list_c<b::value>::f<xs...>

emp::wrap_in_list_c<bool b, xs...> = mp::wrap_in_list_c<b>::f<xs...>

Group: map

<jln/mp/map/is_map.hpp>

is_map<C = identity>

Return: true_ / false_

Checks whether xs is a map.

A map is a sequence of lists having at least one element (the key). The keys of the map must be unique.

Implementation

try_</*...*/, C, always<false_, C>>

emp::is_map<L, C = mp::identity> = unpack<L, mp::is_map<C>>

emp::is_map_xs<kvs...> = mp::is_map<>::f<kvs...>

bool emp::is_map_v<L, C = mp::identity> = unpack<L, mp::is_map<C>>::value

bool emp::is_map_xs_v<kvs...> = mp::is_map<>::f<kvs...>::value

<jln/mp/map/map_contains.hpp>

map_contains<key, C = identity>

Return: true_ / false_

Checks if a key exists in a map.

Implementation

map_find<key, always<true_, C>, always<false_, C>>

Pre-condition

map_not_contains<key, C = identity>

Return: true_ / false_

Checks if a key does not exists in a map.

Implementation

map_find<key, always<false_, C>, always<true_, C>>

Pre-condition

emp::map_contains<L, key, C = mp::identity> = unpack<L, mp::map_contains<key, C>>

emp::map_not_contains<L, key, C = mp::identity> = unpack<L, mp::map_not_contains<key, C>>

emp::map_contains_xs<key, kvs...> = mp::map_contains<key>::f<kvs...>

emp::map_not_contains_xs<key, kvs...> = mp::map_not_contains<key>::f<kvs...>

bool emp::map_contains_v<L, key, C = mp::identity> = unpack<L, mp::map_contains<key, C>>::value

bool emp::map_not_contains_v<L, key, C = mp::identity> = unpack<L, mp::map_not_contains<key, C>>::value

bool emp::map_contains_xs_v<key, kvs...> = mp::map_contains<key>::f<kvs...>::value

bool emp::map_not_contains_xs_v<key, kvs...> = !mp::map_contains<key>::f<kvs...>::value

<jln/mp/map/map_erase.hpp>

map_erase<Key, C = listify>

Return: map

If the map contains an element with a key Key, removes it.

Implementation

transform<map_find<Key, always<list<>>, listify>, join<C>>

Pre-condition

emp::map_erase<L, Key, C = mp::listify> = unpack<L, mp::map_erase<Key, C>>

<jln/mp/map/map_find.hpp>

map_find<key, TC = identity, FC = always<na>>::f<kvs...>

Return: sequence

Finds the element of the map with a key key.

Calls TC with element found. If no element is found, FC is used with the whole map.

Implementation

decltype(/*...*/)::f<TC, FC, kvs...>

Pre-condition

map_find_or_else<key, FC>

Implementation

map_find<key, identity, FC>

map_find_or<key, FT>

Implementation

map_find<key, identity, always<FT>>

emp::map_find<L, key, TC = mp::identity, FC = mp::always<na>> = unpack<L, mp::map_find<key, TC, FC>>

emp::map_find_or_else<L, key, FC> = unpack<L, mp::map_find<key, mp::identity, FC>>

emp::map_find_or<L, key, FT> = unpack<L, mp::map_find<key, mp::identity, mp::always<FT>>>

<jln/mp/map/map_insert.hpp>

map_insert<KV, C = listify>

Return: map

Inserts the element KV into the map, if the key emp::front<KV> does not exist.

Implementation

if_<map_contains<unpack<front<>>::f<KV>>, C, push_back<KV, C>>

Pre-condition

emp::map_insert<L, KV, C = mp::listify> = unpack<L, mp::map_insert<KV, C>>

<jln/mp/map/map_keys.hpp>

map_keys<C = listify>

Return: sequence

Returns a list of the keys of map.

When is a valid map, the keys are unique, so the result is a set.

Implementation

transform<unpack<front<>>, C>

map_keys_with<F = mp::identity, C = listify>

Return: sequence

Returns a list of the keys of map transformed with F.

When is a valid map, the keys are unique.

Implementation

transform<unpack<front<F>>, C>

emp::map_keys<L, C = mp::listify> = unpack<L, mp::map_keys<C>>

emp::map_keys_with<L, F = mp::identity, C = mp::listify> = unpack<L, mp::map_keys_with<F, C>>

<jln/mp/map/map_replace.hpp>

map_replace<KV, C = listify>

Return: map

If the map contain the key emp::front<KV>, replaces the existing element with KV.

Implementation

map_update<unpack<front<>>::f<KV>, always<KV>, C>

Pre-condition

map_replace_or_insert<KV, C = listify>

Return: map

If the map contain the key emp::front<KV>, replaces the existing element with KV; otherwise, inserts it using push_back<KV>.

Implementation

map_update_or_insert<KV, always<KV>, C>

Pre-condition

emp::map_replace<L, KV, C = mp::listify> = unpack<L, mp::map_replace<KV, C>>

emp::map_replace_or_insert<L, KV, C = mp::listify> = unpack<L, mp::map_replace_or_insert<KV, C>>

<jln/mp/map/map_update.hpp>

map_update<Key, F, C = listify>

Return: sequence

If the map contain the key Key, replaces the existing element L<k, v...> with F<k, v...>.

Implementation

transform<map_find<Key, F, front<>>, C>

Pre-condition

map_element_value_update<F>::f<x>

Update an element L<k, v...> with L<k, F<k, v...>>.

Implementation

unpack<tee<front<>, F, emp::wrapper<x>>>::f<x>

Pre-condition

map_element_key_update<F>::f<x>

Update an element L<k, v...> with L<F<k, v...>, v...>.

Implementation

unpack<partial_tee<F, emp::wrapper<x>>>::f<x>

Pre-condition

map_update_key<Key, F, C = listify>

Return: sequence

If the map contain the key Key, replaces the existing element L<k, v...> with L<F<k, v...>, v...>.

Implementation

map_update<Key, map_element_key_update<F>, C>

Pre-condition

map_update_value<Key, F, C = listify>

Return: map

If the map contain the key Key, replaces the existing element L<k, v...> with L<k, F<k, v...>>.

Implementation

map_update<Key, map_element_value_update<F>, C>

Pre-condition

map_update_or_insert<KV, F, C = listify>

Return: sequence

If the map contain a key emp::front<KV>, replaces the existing element L<k, v...> with F<k, v...>; otherwise, inserts it using push_back<KV>.

Implementation

if_<map_contains<unpack<front<>>::f<KV>>, map_update<unpack<front<>>::f<KV>, F, C>, push_back<KV, C>>

Pre-condition

map_update_value_or_insert<KV, F, C = listify>

Return: map

If the map contain a key emp::front<KV>, replaces the existing element L<k, v...> with L<k, F<k, v...>>; otherwise, inserts it using push_back<KV>.

Pre-condition

emp::map_update<L, Key, F, C = mp::listify> = unpack<L, mp::map_update<Key, F, C>>

emp::map_element_key_update<KV, F> = mp::map_element_key_update<F>::f<KV>

emp::map_element_value_update<KV, F> = mp::map_element_value_update<F>::f<KV>

emp::map_update_key<L, Key, F, C = mp::listify> = unpack<L, mp::map_update_key<Key, F, C>>

emp::map_update_value<L, Key, F, C = mp::listify> = unpack<L, mp::map_update_value<Key, F, C>>

emp::map_update_or_insert<L, KV, F, C = mp::listify> = unpack<L, mp::map_update_or_insert<KV, F, C>>

emp::map_update_value_or_insert<L, KV, F, C = mp::listify> = unpack<L, mp::map_update_value_or_insert<KV, F, C>>

Group: number

<jln/mp/number/as_bool.hpp>

as_bool<C = identity>::f<x>

Return: true_ / false_

Convertion without narrowing from value to true_ / false_.

Implementation

C::f<number<bool{x::value}>>

emp::as_bool<x> = number<bool{x::value}>

<jln/mp/number/as_number.hpp>

as_number<C = identity>::f<x>

Return: number

Convertion without narrowing from value to number.

Implementation

C::f<number<int_{x::value}>>

emp::as_number<x> = number<int_{x::value}>

<jln/mp/list/indices.hpp>

indices<C = listify>

Return: sequence

Replaces each element of a sequence by its corresponding index.

Implementation

size<make_int_sequence<C>>

emp::indices<L, C = mp::listify> = unpack<L, mp::indices<C>>

<jln/mp/number/number.hpp>

int_

Implementation

std::intmax_t

uint_

Implementation

std::uintmax_t

number<int_ v>::value

Implementation

v

true_

Implementation

number<1>

false_

Implementation

number<0>

<jln/mp/algorithm/iota.hpp>

iota_v<C = numbers<>>::f<start, count, stride = number<1>>

Return: sequence of int_

Generates a sequence of int_.

iota<C = listify>

Return: sequence of number

Generates a sequence of number.

Implementation

iota_v<numbers<C>>

emp::iota_v_c<int_ start, int_ count, int_ stride = 1, C = mp::numbers<>> = /*...*/

emp::iota_v<start, count, stride = number<1>, C = mp::numbers<>> = /*...*/

emp::iota_c<int_ start, int_ count, int_ stride = 1, C = mp::listify> = /*...*/

emp::iota<start, count, stride = number<1>, C = mp::listify> = /*...*/

<jln/mp/number/is_number.hpp>

is_number<C = identity>::f<x>

Return: true_ / false_

Checks whether a value is a number.

Implementation

C::f<number<emp::is_number_v<x>>>

bool emp::is_number_v<x> = false

emp::is_number<x> = number<emp::is_number_v<x>>

<jln/mp/algorithm/make_int_sequence.hpp>

make_int_sequence_v<C = numbers<>>::f<n>

Return: sequence

Generates an incremental sequence of n int_.

make_int_sequence<C = mp::listify>

Implementation

make_int_sequence_v<mp::numbers<C>>

int_seq_c<int_... i>

single list of int_

emp::make_int_sequence_v_c<unsigned n, C = mp::numbers<>> = /*...*/

emp::make_int_sequence_c<unsigned n, C = mp::listify> = /*...*/

emp::make_int_sequence_v<n, C = mp::numbers<>> = /*...*/

emp::make_int_sequence<n, C = mp::listify> = /*...*/

<jln/mp/number/math.hpp>

min<Cmp = less<>, C = identity>

Implementation

fold<if_<flip<Cmp>, at1<>, at0<>>, C>

min0<Cmp = less<>, C = identity>

Implementation

if_<size<>, min<Cmp, C>, always<number<0>, C>>

max<Cmp = less<>, C = identity>

Implementation

fold<if_<Cmp, at1<>, at0<>>, C>

max0<Cmp = less<>, C = identity>

Implementation

if_<size<>, max<Cmp, C>, always<number<0>, C>>

clamp<Min, Max, Cmp = less<>, C = identity>

Implementation

if_<push_back<Min, Cmp>, always<Min>, /*...*/>

clamp_c<int_ min, int_ max, Cmp = less<>, C = identity>

Implementation

clamp<number<min>, number<max>, Cmp, C>

abs<Cmp = less<>, C = identity>

Implementation

tee<identity, neg<>, if_<Cmp, at1<C>, at0<C>>>

pow<C = identity>::f<base, exponent>

Implementation

C::f<number</*...*/>>

emp::min<L, Cmp = mp::less<>, C = mp::identity> = unpack<L, mp::min<Cmp, C>>

emp::min0<L, Cmp = mp::less<>, C = mp::identity> = unpack<L, mp::min0<Cmp, C>>

emp::max<L, Cmp = mp::less<>, C = mp::identity> = unpack<L, mp::max<Cmp, C>>

emp::max0<L, Cmp = mp::less<>, C = mp::identity> = unpack<L, mp::max0<Cmp, C>>

emp::clamp<I, Min, Max, Cmp = mp::less<>, C = mp::identity> = mp::clamp<Min, Max, Cmp, C>::f<I>

emp::clamp_c<int_ I, int_ min, int_ max, Cmp = mp::less<>, C = mp::identity> = mp::clamp_c<min, max, Cmp, C>::f<number<I>>

emp::abs<I, Cmp = mp::less<>, C = mp::identity> = mp::abs<Cmp, C>::f<I>

emp::abs_c<int_ I, Cmp = mp::less<>, C = mp::identity> = mp::abs<Cmp, C>::f<number<I>>

emp::pow<Base, Exponent, C = mp::identity> = mp::pow<C>::f<Base, Exponent>

emp::pow_c<int_ Base, int_ Exponent, C = mp::identity> = mp::pow<C>::f<number<Base>, number<Exponent>>

int_ emp::min_v<xs...> = mp::min<>::f<xs...>::value

int_ emp::min0_v<xs...> = mp::min0<>::f<xs...>::value

int_ emp::min_c_v<int_... xs> = mp::min<>::f<number<xs>...>::value

int_ emp::min0_c_v<int_... xs> = mp::min0<>::f<number<xs>...>::value

int_ emp::max_v<xs...> = mp::max<>::f<xs...>::value

int_ emp::max0_v<xs...> = mp::max0<>::f<xs...>::value

int_ emp::max_c_v<int_... xs> = mp::max<>::f<number<xs>...>::value

int_ emp::max0_c_v<int_... xs> = mp::max0<>::f<number<xs>...>::value

int_ emp::clamp_v<I, Min, Max, Cmp = mp::less<>, C = mp::identity> = mp::clamp<Min, Max, Cmp, C>::f<I>::value

int_ emp::clamp_c_v<int_ I, int_ min, int_ max, Cmp = mp::less<>, C = mp::identity> = mp::clamp_c<min, max, Cmp, C>::f<number<I>>::value

int_ emp::abs_v<I, Cmp = mp::less<>, C = mp::identity> = mp::abs<Cmp, C>::f<I>::value

int_ emp::abs_c_v<int_ I, Cmp = mp::less<>, C = mp::identity> = mp::abs<Cmp, C>::f<number<I>>::value

int_ emp::pow_v<Base, Exponent> = /*...*/

int_ emp::pow_c_v<int_ base, int_ exponent> = /*...*/

<jln/mp/number/not.hpp>

not_<C = identity>::f<x>

Implementation

C::f<number<!x::value>>

not_<not_<C>>::f<x>

Implementation

C::f<number<bool(x::value)>>

emp::not_<x, C = mp::identity> = mp::not_<C>::f<x>

bool emp::not_v<x, C = mp::identity> = mp::not_<C>::f<x>::value

<jln/mp/number/numbers.hpp>

numbers<C = listify>::f<int_... ns>

Implementation

C::f<number<ns>...>

emp::numbers<int_... vs> = list<number<vs>...>

<jln/mp/number/operators.hpp>

or_<C = identity>::f<xs...>

Implementation

C::f<number<(xs::value || ... || false)>>

left_or<C = identity>::f<xs...>

Implementation

C::f<number<(false || ... || xs::value)>>

and_<C = identity>::f<xs...>

Implementation

C::f<number<(xs::value && ... && true)>>

left_and<C = identity>::f<xs...>

Implementation

C::f<number<(true && ... && xs::value)>>

add<C = identity>::f<xs...>

Implementation

C::f<number<(xs::value + ...)>>

add0<C = identity>

Implementation

if_<size<>, add<C>, always<number<0>, C>>

left_add<C = identity>::f<xs...>

Implementation

C::f<number<(... + xs::value)>>

left_add0<C = identity>

Implementation

if_<size<>, left_add<C>, always<number<0>, C>>

sub<C = identity>::f<xs...>

Implementation

C::f<number<(... - xs::value)>>

sub0<C = identity>

Implementation

if_<size<>, sub<C>, always<number<0>, C>>

lshift<C = identity>::f<xs...>

Implementation

C::f<number<(... << xs::value)>>

lshift0<C = identity>

Implementation

if_<size<>, lshift<C>, always<number<0>, C>>

rshift<C = identity>::f<xs...>

Implementation

C::f<number<(... >> xs::value)>>

rshift0<C = identity>

Implementation

if_<size<>, rshift<C>, always<number<0>, C>>

mul<C = identity>::f<xs...>

Implementation

C::f<number<(xs::value * ...)>>

mul0<C = identity>

Implementation

if_<size<>, mul<C>, always<number<0>, C>>

mul1<C = identity>

Implementation

if_<size<>, mul<C>, always<number<1>, C>>

left_mul<C = identity>::f<xs...>

Implementation

C::f<number<(... * xs::value)>>

left_mul0<C = identity>

Implementation

if_<size<>, left_mul<C>, always<number<0>, C>>

left_mul1<C = identity>

Implementation

if_<size<>, left_mul<C>, always<number<1>, C>>

div<C = identity>::f<xs...>

Implementation

C::f<number<(... / xs::value)>>

div0<C = identity>

Implementation

if_<size<>, div<C>, always<number<0>, C>>

div1<C = identity>

Implementation

if_<size<>, div<C>, always<number<1>, C>>

mod<C = identity>::f<xs...>

Implementation

C::f<number<(... % xs::value)>>

mod0<C = identity>

Implementation

if_<size<>, mod<C>, always<number<0>, C>>

mod1<C = identity>

Implementation

if_<size<>, mod<C>, always<number<1>, C>>

xor_<C = identity>::f<xs...>

Implementation

C::f<number<(xs::value ^ ...)>>

xor0<C = identity>

Implementation

if_<size<>, xor_<C>, always<number<0>, C>>

left_xor<C = identity>::f<xs...>

Implementation

C::f<number<(... ^ xs::value)>>

left_xor0<C = identity>

Implementation

if_<size<>, left_xor<C>, always<number<0>, C>>

bit_and<C = identity>::f<xs...>

Implementation

C::f<number<(xs::value & ...)>>

bit_and0<C = identity>

Implementation

if_<size<>, bit_and<C>, always<number<0>, C>>

left_bit_and<C = identity>::f<xs...>

Implementation

C::f<number<(... & xs::value)>>

left_bit_and0<C = identity>

Implementation

if_<size<>, left_bit_and<C>, always<number<0>, C>>

bit_or<C = identity>::f<xs...>

Implementation

C::f<number<(xs::value | ...)>>

bit_or0<C = identity>

Implementation

if_<size<>, bit_or<C>, always<number<0>, C>>

left_bit_or<C = identity>::f<xs...>

Implementation

C::f<number<(... | xs::value)>>

left_bit_or0<C = identity>

Implementation

if_<size<>, left_bit_or<C>, always<number<0>, C>>

neg<C = identity>::f<x>

Implementation

C::f<number<(-x::value)>>

unary_plus<C = identity>::f<x>

Implementation

C::f<number<(+x::value)>>

bit_not<C = identity>::f<x>

Implementation

C::f<number<(~x::value)>>

inc<C = identity>::f<x>

Implementation

C::f<number<(x::value+1)>>

dec<C = identity>::f<x>

Implementation

C::f<number<(x::value-1)>>

equal<C = identity>::f<x, y>

Implementation

C::f<number<(x::value == y::value)>>

not_equal<C = identity>::f<x, y>

Implementation

C::f<number<(x::value != y::value)>>

less<C = identity>::f<x, y>

Implementation

C::f<number<(x::value < y::value)>>

less_equal<C = identity>::f<x, y>

Implementation

C::f<number<(x::value <= y::value)>>

greater<C = identity>::f<x, y>

Implementation

C::f<number<(x::value > y::value)>>

greater_equal<C = identity>::f<x, y>

Implementation

C::f<number<(x::value >= y::value)>>

equal_to<N, C = identity>

Implementation

push_front<N, equal<C>>

not_equal_to<N, C = identity>

Implementation

push_front<N, not_equal<C>>

less_than<N, C = identity>

Implementation

push_back<N, less<C>>

less_equal_than<N, C = identity>

Implementation

push_back<N, less_equal<C>>

greater_than<N, C = identity>

Implementation

push_back<N, greater<C>>

greater_equal_than<N, C = identity>

Implementation

push_back<N, greater_equal<C>>

equal_to_c<int_ n, C = identity>

Implementation

equal_to<number<n>, C>

not_equal_to_c<int_ n, C = identity>

Implementation

not_equal_to<number<n>, C>

less_than_c<int_ n, C = identity>

Implementation

less_than<number<n>, C>

less_equal_than_c<int_ n, C = identity>

Implementation

less_equal_than<number<n>, C>

greater_than_c<int_ n, C = identity>

Implementation

greater_than<number<n>, C>

greater_equal_than_c<int_ n, C = identity>

Implementation

greater_equal_than<number<n>, C>

emp::or_seq<L, C = mp::identity> = unpack<L, mp::or_<C>>

emp::and_seq<L, C = mp::identity> = unpack<L, mp::and_<C>>

emp::or_left_seq<L, C = mp::identity> = unpack<L, mp::left_or<C>>

emp::and_left_seq<L, C = mp::identity> = unpack<L, mp::left_and<C>>

emp::add_seq<L, C = mp::identity> = unpack<L, mp::add<C>>

emp::add0_seq<L, C = mp::identity> = unpack<L, mp::add0<C>>

emp::left_add_seq<L, C = mp::identity> = unpack<L, mp::left_add<C>>

emp::left_add0_seq<L, C = mp::identity> = unpack<L, mp::left_add0<C>>

emp::sub_seq<L, C = mp::identity> = unpack<L, mp::sub<C>>

emp::sub0_seq<L, C = mp::identity> = unpack<L, mp::sub0<C>>

emp::lshift_seq<L, C = mp::identity> = unpack<L, mp::lshift<C>>

emp::lshift0_seq<L, C = mp::identity> = unpack<L, mp::lshift0<C>>

emp::rshift_seq<L, C = mp::identity> = unpack<L, mp::rshift<C>>

emp::rshift0_seq<L, C = mp::identity> = unpack<L, mp::rshift0<C>>

emp::mul_seq<L, C = mp::identity> = unpack<L, mp::mul<C>>

emp::mul0_seq<L, C = mp::identity> = unpack<L, mp::mul0<C>>

emp::mul1_seq<L, C = mp::identity> = unpack<L, mp::mul1<C>>

emp::left_mul_seq<L, C = mp::identity> = unpack<L, mp::left_mul<C>>

emp::left_mul0_seq<L, C = mp::identity> = unpack<L, mp::left_mul0<C>>

emp::left_mul1_seq<L, C = mp::identity> = unpack<L, mp::left_mul1<C>>

emp::div_seq<L, C = mp::identity> = unpack<L, mp::div<C>>

emp::div0_seq<L, C = mp::identity> = unpack<L, mp::div0<C>>

emp::div1_seq<L, C = mp::identity> = unpack<L, mp::div1<C>>

emp::mod_seq<L, C = mp::identity> = unpack<L, mp::mod<C>>

emp::mod0_seq<L, C = mp::identity> = unpack<L, mp::mod0<C>>

emp::mod1_seq<L, C = mp::identity> = unpack<L, mp::mod1<C>>

emp::xor_seq<L, C = mp::identity> = unpack<L, mp::xor_<C>>

emp::xor0_seq<L, C = mp::identity> = unpack<L, mp::xor0<C>>

emp::left_xor_seq<L, C = mp::identity> = unpack<L, mp::left_xor<C>>

emp::left_xor0_seq<L, C = mp::identity> = unpack<L, mp::left_xor0<C>>

emp::bit_and_seq<L, C = mp::identity> = unpack<L, mp::bit_and<C>>

emp::bit_and0_seq<L, C = mp::identity> = unpack<L, mp::bit_and0<C>>

emp::left_bit_and_seq<L, C = mp::identity> = unpack<L, mp::left_bit_and<C>>

emp::left_bit_and0_seq<L, C = mp::identity> = unpack<L, mp::left_bit_and0<C>>

emp::bit_or_seq<L, C = mp::identity> = unpack<L, mp::bit_or<C>>

emp::bit_or0_seq<L, C = mp::identity> = unpack<L, mp::bit_or0<C>>

emp::left_bit_or_seq<L, C = mp::identity> = unpack<L, mp::left_bit_or<C>>

emp::left_bit_or0_seq<L, C = mp::identity> = unpack<L, mp::left_bit_or0<C>>

emp::or_c<int_... xs> = number<(xs || ... || false)>

emp::left_or_c<int_... xs> = number<(false || ... || xs)>

emp::and_c<int_... xs> = number<(xs && ... && true)>

emp::left_and_c<int_... xs> = number<(true && ... && xs)>

emp::add_c<int_... xs> = number<(xs + ...)>

emp::add0_c<int_... xs> = add_c<xs..., 0>

emp::left_add_c<int_... xs> = number<(... + xs)>

emp::left_add0_c<int_... xs> = left_add_c<xs..., 0>

emp::sub_c<int_... xs> = number<(... - xs)>

emp::sub0_c<int_... xs> = sub_c<xs..., 0>

emp::lshift_c<int_... xs> = number<(... << xs)>

emp::lshift0_c<int_... xs> = lshift_c<xs..., 0>

emp::rshift_c<int_... xs> = number<(... >> xs)>

emp::rshift0_c<int_... xs> = rshift_c<xs..., 0>

emp::mul_c<int_... xs> = number<(xs * ...)>

emp::mul0_c<int_... xs> = mul_c<xs..., (sizeof...(xs) ? 1 : 0)>

emp::mul1_c<int_... xs> = mul_c<xs..., 1>

emp::left_mul_c<int_... xs> = number<(... * xs)>

emp::left_mul0_c<int_... xs> = left_mul_c<xs..., (sizeof...(xs) ? 1 : 0)>

emp::left_mul1_c<int_... xs> = left_mul_c<xs..., 1>

emp::div_c<int_... xs> = number<(... / xs)>

emp::div0_c<int_... xs> = div_c<xs..., (sizeof...(xs) ? 1 : 0)>

emp::div1_c<int_... xs> = div_c<xs..., 1>

emp::mod_c<int_... xs> = number<(... % xs)>

emp::mod0_c<int_... xs> = mod_c<xs..., (sizeof...(xs) ? std::numeric_limits<int_>::min() : 0)>

emp::mod1_c<int_... xs> = mod_c<xs..., (sizeof...(xs) ? std::numeric_limits<int_>::min() : 1)>

emp::xor_c<int_... xs> = number<(xs ^ ...)>

emp::xor0_c<int_... xs> = xor_c<xs..., 0, 0>

emp::left_xor_c<int_... xs> = number<(... ^ xs)>

emp::left_xor0_c<int_... xs> = left_xor_c<xs..., 0, 0>

emp::bit_and_c<int_... xs> = number<(xs & ...)>

emp::bit_and0_c<int_... xs> = bit_and_c<xs..., (sizeof...(xs) ? std::numeric_limits<int_>::max() : 0)>

emp::left_bit_and_c<int_... xs> = number<(... & xs)>

emp::left_bit_and0_c<int_... xs> = left_bit_and_c<xs..., (sizeof...(xs) ? std::numeric_limits<int_>::max() : 0)>

emp::bit_or_c<int_... xs> = number<(xs | ...)>

emp::bit_or0_c<int_... xs> = bit_or_c<xs..., (sizeof...(xs) ? std::numeric_limits<int_>::max() : 0)>

emp::left_bit_or_c<int_... xs> = number<(... | xs)>

emp::left_bit_or0_c<int_... xs> = left_bit_or_c<xs..., (sizeof...(xs) ? std::numeric_limits<int_>::max() : 0)>

emp::or_<xs...> = number<(xs::value || ... || false)>

emp::and_<xs...> = number<(xs::value && ... && true)>

emp::left_or<xs...> = number<(false || ... || xs::value)>

emp::left_and<xs...> = number<(true && ... && xs::value)>

emp::add<xs...> = number<(xs::value + ...)>

emp::add0<xs...> = mp::add0<>::f<xs...>

emp::left_add<xs...> = number<(... + xs::value)>

emp::left_add0<xs...> = mp::add0<>::f<xs...>

emp::sub<xs...> = number<(... - xs::value)>

emp::sub0<xs...> = mp::sub0<>::f<xs...>

emp::lshift<xs...> = number<(... << xs::value)>

emp::lshift0<xs...> = mp::lshift0<>::f<xs...>

emp::rshift<xs...> = number<(... >> xs::value)>

emp::rshift0<xs...> = mp::rshift0<>::f<xs...>

emp::mul<xs...> = number<(xs::value * ...)>

emp::mul0<xs...> = mp::mul0<>::f<xs...>

emp::mul1<xs...> = mp::mul1<>::f<xs...>

emp::left_mul<xs...> = number<(... * xs::value)>

emp::left_mul0<xs...> = mp::left_mul0<>::f<xs...>

emp::left_mul1<xs...> = mp::left_mul1<>::f<xs...>

emp::div<xs...> = number<(... / xs::value)>

emp::div0<xs...> = mp::div0<>::f<xs...>

emp::div1<xs...> = mp::div1<>::f<xs...>

emp::mod<xs...> = number<(... % xs::value)>

emp::mod0<xs...> = mp::mod0<>::f<xs...>

emp::mod1<xs...> = mp::mod1<>::f<xs...>

emp::xor_<xs...> = number<(xs::value ^ ...)>

emp::xor0<xs...> = mp::xor0<>::f<xs...>

emp::left_xor<xs...> = number<(... ^ xs::value)>

emp::left_xor0<xs...> = mp::left_xor0<>::f<xs...>

emp::bit_and<xs...> = number<(xs::value & ...)>

emp::bit_and0<xs...> = mp::bit_and0<>::f<xs...>

emp::left_bit_and<xs...> = number<(... & xs::value)>

emp::left_bit_and0<xs...> = mp::left_bit_and0<>::f<xs...>

emp::bit_or<xs...> = number<(xs::value | ...)>

emp::bit_or0<xs...> = mp::bit_or0<>::f<xs...>

emp::left_bit_or<xs...> = number<(... | xs::value)>

emp::left_bit_or0<xs...> = mp::left_bit_or0<>::f<xs...>

emp::neg<x, C = mp::identity> = mp::neg<C>::f<x>

emp::unary_plus<x, C = mp::identity> = mp::unary_plus<C>::f<x>

emp::bit_not<x, C = mp::identity> = mp::bit_not<C>::f<x>

emp::inc<x, C = mp::identity> = mp::inc<C>::f<x>

emp::dec<x, C = mp::identity> = mp::dec<C>::f<x>

emp::equal<x, y, C = mp::identity> = mp::equal<C>::f<x, y>

emp::not_equal<x, y, C = mp::identity> = mp::not_equal<C>::f<x, y>

emp::less<x, y, C = mp::identity> = mp::less<C>::f<x, y>

emp::less_equal<x, y, C = mp::identity> = mp::less_equal<C>::f<x, y>

emp::greater<x, y, C = mp::identity> = mp::greater<C>::f<x, y>

emp::greater_equal<x, y, C = mp::identity> = mp::greater_equal<C>::f<x, y>

int_ emp::or_seq_v<L, C = mp::identity> = unpack<L, mp::or_<C>>::value

int_ emp::and_seq_v<L, C = mp::identity> = unpack<L, mp::and_<C>>::value

int_ emp::or_left_seq_v<L, C = mp::identity> = unpack<L, mp::left_or<C>>::value

int_ emp::and_left_seq_v<L, C = mp::identity> = unpack<L, mp::left_and<C>>::value

int_ emp::add_seq_v<L, C = mp::identity> = unpack<L, mp::add<C>>::value

int_ emp::add0_seq_v<L, C = mp::identity> = unpack<L, mp::add0<C>>::value

int_ emp::left_add_seq_v<L, C = mp::identity> = unpack<L, mp::left_add<C>>::value

int_ emp::left_add0_seq_v<L, C = mp::identity> = unpack<L, mp::left_add0<C>>::value

int_ emp::sub_seq_v<L, C = mp::identity> = unpack<L, mp::sub<C>>::value

int_ emp::sub0_seq_v<L, C = mp::identity> = unpack<L, mp::sub0<C>>::value

int_ emp::lshift_seq_v<L, C = mp::identity> = unpack<L, mp::lshift<C>>::value

int_ emp::lshift0_seq_v<L, C = mp::identity> = unpack<L, mp::lshift0<C>>::value

int_ emp::rshift_seq_v<L, C = mp::identity> = unpack<L, mp::rshift<C>>::value

int_ emp::rshift0_seq_v<L, C = mp::identity> = unpack<L, mp::rshift0<C>>::value

int_ emp::mul_seq_v<L, C = mp::identity> = unpack<L, mp::mul<C>>::value

int_ emp::mul0_seq_v<L, C = mp::identity> = unpack<L, mp::mul0<C>>::value

int_ emp::mul1_seq_v<L, C = mp::identity> = unpack<L, mp::mul1<C>>::value

int_ emp::left_mul_seq_v<L, C = mp::identity> = unpack<L, mp::left_mul<C>>::value

int_ emp::left_mul0_seq_v<L, C = mp::identity> = unpack<L, mp::left_mul0<C>>::value

int_ emp::left_mul1_seq_v<L, C = mp::identity> = unpack<L, mp::left_mul1<C>>::value

int_ emp::div_seq_v<L, C = mp::identity> = unpack<L, mp::div<C>>::value

int_ emp::div0_seq_v<L, C = mp::identity> = unpack<L, mp::div0<C>>::value

int_ emp::div1_seq_v<L, C = mp::identity> = unpack<L, mp::div1<C>>::value

int_ emp::mod_seq_v<L, C = mp::identity> = unpack<L, mp::mod<C>>::value

int_ emp::mod0_seq_v<L, C = mp::identity> = unpack<L, mp::mod0<C>>::value

int_ emp::mod1_seq_v<L, C = mp::identity> = unpack<L, mp::mod1<C>>::value

int_ emp::xor_seq_v<L, C = mp::identity> = unpack<L, mp::xor_<C>>::value

int_ emp::xor0_seq_v<L, C = mp::identity> = unpack<L, mp::xor0<C>>::value

int_ emp::left_xor_seq_v<L, C = mp::identity> = unpack<L, mp::left_xor<C>>::value

int_ emp::left_xor0_seq_v<L, C = mp::identity> = unpack<L, mp::left_xor0<C>>::value

int_ emp::bit_and_seq_v<L, C = mp::identity> = unpack<L, mp::bit_and<C>>::value

int_ emp::bit_and0_seq_v<L, C = mp::identity> = unpack<L, mp::bit_and0<C>>::value

int_ emp::left_bit_and_seq_v<L, C = mp::identity> = unpack<L, mp::left_bit_and<C>>::value

int_ emp::left_bit_and0_seq_v<L, C = mp::identity> = unpack<L, mp::left_bit_and0<C>>::value

int_ emp::bit_or_seq_v<L, C = mp::identity> = unpack<L, mp::bit_or<C>>::value

int_ emp::bit_or0_seq_v<L, C = mp::identity> = unpack<L, mp::bit_or0<C>>::value

int_ emp::left_bit_or_seq_v<L, C = mp::identity> = unpack<L, mp::left_bit_or<C>>::value

int_ emp::left_bit_or0_seq_v<L, C = mp::identity> = unpack<L, mp::left_bit_or0<C>>::value

int_ emp::or_c_v<int_... xs> = (xs || ... || false)

int_ emp::left_or_c_v<int_... xs> = (false || ... || xs)

int_ emp::and_c_v<int_... xs> = (xs && ... && true)

int_ emp::left_and_c_v<int_... xs> = (true && ... && xs)

int_ emp::add_c_v<int_... xs> = (xs + ...)

int_ emp::add0_c_v<int_... xs> = add_c_v<xs..., 0>

int_ emp::left_add_c_v<int_... xs> = (... + xs)

int_ emp::left_add0_c_v<int_... xs> = left_add_c_v<xs..., 0>

int_ emp::sub_c_v<int_... xs> = (... - xs)

int_ emp::sub0_c_v<int_... xs> = sub_c_v<xs..., 0>

int_ emp::lshift_c_v<int_... xs> = (... << xs)

int_ emp::lshift0_c_v<int_... xs> = lshift_c_v<xs..., 0>

int_ emp::rshift_c_v<int_... xs> = (... >> xs)

int_ emp::rshift0_c_v<int_... xs> = rshift_c_v<xs..., 0>

int_ emp::mul_c_v<int_... xs> = (xs * ...)

int_ emp::mul0_c_v<int_... xs> = mul_c_v<xs..., sizeof...(xs) ? 1 : 0>

int_ emp::mul1_c_v<int_... xs> = mul_c_v<xs..., 1>

int_ emp::left_mul_c_v<int_... xs> = (... * xs)

int_ emp::left_mul0_c_v<int_... xs> = left_mul_c_v<xs..., sizeof...(xs) ? 1 : 0>

int_ emp::left_mul1_c_v<int_... xs> = left_mul_c_v<xs..., 1>

int_ emp::div_c_v<int_... xs> = (... / xs)

int_ emp::div0_c_v<int_... xs> = div_c_v<xs..., sizeof...(xs) ? 1 : 0>

int_ emp::div1_c_v<int_... xs> = div_c_v<xs..., 1>

int_ emp::mod_c_v<int_... xs> = (... % xs)

int_ emp::mod0_c_v<int_... xs> = mod_c_v<xs..., sizeof...(xs) ? std::numeric_limits<int_>::min() : 0>

int_ emp::mod1_c_v<int_... xs> = mod_c_v<xs..., sizeof...(xs) ? std::numeric_limits<int_>::min() : 1>

int_ emp::xor_c_v<int_... xs> = (xs ^ ...)

int_ emp::xor0_c_v<int_... xs> = xor_c_v<xs..., 0, 0>

int_ emp::left_xor_c_v<int_... xs> = (... ^ xs)

int_ emp::left_xor0_c_v<int_... xs> = left_xor_c_v<xs..., 0, 0>

int_ emp::bit_and_c_v<int_... xs> = (xs & ...)

int_ emp::bit_and0_c_v<int_... xs> = bit_and_c_v<xs..., sizeof...(xs) ? std::numeric_limits<int_>::max() : 0>

int_ emp::left_bit_and_c_v<int_... xs> = (... & xs)

int_ emp::left_bit_and0_c_v<int_... xs> = left_bit_and_c_v<xs..., sizeof...(xs) ? std::numeric_limits<int_>::max() : 0>

int_ emp::bit_or_c_v<int_... xs> = (xs | ...)

int_ emp::bit_or0_c_v<int_... xs> = bit_or_c_v<xs..., sizeof...(xs) ? std::numeric_limits<int_>::max() : 0>

int_ emp::left_bit_or_c_v<int_... xs> = (... | xs)

int_ emp::left_bit_or0_c_v<int_... xs> = left_bit_or_c_v<xs..., sizeof...(xs) ? std::numeric_limits<int_>::max() : 0>

int_ emp::or_v<xs...> = (xs::value || ... || false)

int_ emp::and_v<xs...> = (xs::value && ... && true)

int_ emp::left_or_v<xs...> = (false || ... || xs::value)

int_ emp::left_and_v<xs...> = (true && ... && xs::value)

int_ emp::add_v<xs...> = (xs::value + ...)

int_ emp::add0_v<xs...> = mp::add0<>::f<xs...>::value

int_ emp::left_add_v<xs...> = (... + xs::value)

int_ emp::left_add0_v<xs...> = mp::add0<>::f<xs...>::value

int_ emp::sub_v<xs...> = (... - xs::value)

int_ emp::sub0_v<xs...> = mp::sub0<>::f<xs...>::value

int_ emp::lshift_v<xs...> = (... << xs::value)

int_ emp::lshift0_v<xs...> = mp::lshift0<>::f<xs...>::value

int_ emp::rshift_v<xs...> = (... >> xs::value)

int_ emp::rshift0_v<xs...> = mp::rshift0<>::f<xs...>::value

int_ emp::mul_v<xs...> = (xs::value * ...)

int_ emp::mul0_v<xs...> = mp::mul0<>::f<xs...>::value

int_ emp::mul1_v<xs...> = mp::mul1<>::f<xs...>::value

int_ emp::left_mul_v<xs...> = (... * xs::value)

int_ emp::left_mul0_v<xs...> = mp::left_mul0<>::f<xs...>::value

int_ emp::left_mul1_v<xs...> = mp::left_mul1<>::f<xs...>::value

int_ emp::div_v<xs...> = (... / xs::value)

int_ emp::div0_v<xs...> = mp::div0<>::f<xs...>::value

int_ emp::div1_v<xs...> = mp::div1<>::f<xs...>::value

int_ emp::mod_v<xs...> = (... % xs::value)

int_ emp::mod0_v<xs...> = mp::mod0<>::f<xs...>::value

int_ emp::mod1_v<xs...> = mp::mod1<>::f<xs...>::value

int_ emp::xor_v<xs...> = (xs::value ^ ...)

int_ emp::xor0_v<xs...> = mp::xor0<>::f<xs...>::value

int_ emp::left_xor_v<xs...> = (... ^ xs::value)

int_ emp::left_xor0_v<xs...> = mp::left_xor0<>::f<xs...>::value

int_ emp::bit_and_v<xs...> = (xs::value & ...)

int_ emp::bit_and0_v<xs...> = mp::bit_and0<>::f<xs...>::value

int_ emp::left_bit_and_v<xs...> = (... & xs::value)

int_ emp::left_bit_and0_v<xs...> = mp::left_bit_and0<>::f<xs...>::value

int_ emp::bit_or_v<xs...> = (xs::value | ...)

int_ emp::bit_or0_v<xs...> = mp::bit_or0<>::f<xs...>::value

int_ emp::left_bit_or_v<xs...> = (... | xs::value)

int_ emp::left_bit_or0_v<xs...> = mp::left_bit_or0<>::f<xs...>::value

int_ emp::neg_v<x, C = mp::identity> = mp::neg<C>::f<x>

int_ emp::unary_plus_v<x, C = mp::identity> = mp::unary_plus<C>::f<x>

int_ emp::bit_not_v<x, C = mp::identity> = mp::bit_not<C>::f<x>

int_ emp::inc_v<x, C = mp::identity> = mp::inc<C>::f<x>

int_ emp::dec_v<x, C = mp::identity> = mp::dec<C>::f<x>

int_ emp::equal_v<x, y, C = mp::identity> = mp::equal<C>::f<x, y>

int_ emp::not_equal_v<x, y, C = mp::identity> = mp::not_equal<C>::f<x, y>

int_ emp::less_v<x, y, C = mp::identity> = mp::less<C>::f<x, y::value>

int_ emp::less_equal_v<x, y, C = mp::identity> = mp::less_equal<C>::f<x, y>

int_ emp::greater_v<x, y, C = mp::identity> = mp::greater<C>::f<x, y::value>

int_ emp::greater_equal_v<x, y, C = mp::identity> = mp::greater_equal<C>::f<x, y>

<jln/mp/number/to_bool.hpp>

to_bool<C = identity>::f<x>

Return: true_ / false_

Converts a value to a true_ / false_.

Implementation

C::f<number<bool(x::value)>>

emp::to_bool<x> = number<bool(x::value)>

Group: reduce

<jln/mp/algorithm/fold.hpp>

fold<F, C = identity>::f<xs...>

Return: value

Folds left over a list using a binary predicate.

The first element in the input pack as the state, use push_front<> to add state if needed.

Implementation

C::f</*...*/>

Pre-condition

  • sizeof...(xs) >= 1

Semantics

F::f<F::f<F::f<F::f<xs[0], xs[1]>, xs[2]>, ...>, xs[n-1]>

emp::fold<L, state, F, C = mp::identity> = unpack<L, mp::push_front<state, mp::fold<F, C>>>

emp::reduce<L, F, C = mp::identity> = unpack<L, mp::fold<F, C>>

<jln/mp/algorithm/fold_right.hpp>

fold_right<F, C = identity>::f<xs...>

Return: value

Folds right over a list using a binary predicate.

The first element in the input pack as the state, use push_front<> to add state if needed.

Implementation

C::f</*...*/>

Pre-condition

  • sizeof...(xs) >= 1

Semantics

F::f<xs[1], F::f<..., F::f<xs[n-2], F::f<xs[n-1], xs[0]>>>>

emp::fold_right<L, state, F, C = mp::identity> = unpack<L, mp::push_front<state, mp::fold_right<F, C>>>

<jln/mp/algorithm/fold_tree.hpp>

fold_tree<F, C = identity>::f<xs...>

Return: value

Folds tree over a list using a binary predicate.

recursively fold n/2 value to the left and the rest to the right.

Semantics

Equivalent to F::f<fold_tree::f<...xs[0..n/2]>, fold_tree::f<...xs[n/2..n]>>

fold_balanced_tree<F, C = identity>::f<xs...>

Return: value

Folds tree over a list using a binary predicate.

recursively fold (n+1)/2 value to the left and the rest to the right.

Semantics

Equivalent to F::f<fold_tree::f<...xs[0..(n+1)/2]>, fold_tree::f<...xs[n-(n+1)/2..n]>>

emp::fold_tree<L, F, C = mp::identity> = unpack<L, mp::fold_tree<F, C>>

emp::fold_balanced_tree<L, F, C = mp::identity> = unpack<L, mp::fold_balanced_tree<F, C>>

<jln/mp/algorithm/fold_xs.hpp>

partial_fold_xs_c<int_ OffsetEnd, F, C = identity>::f<xs...>

As fold_xs, but stop at position OffsetEnd.

Implementation

C::f</*...*/>

partial_fold_xs<OffsetEnd, F, C = identity>

Implementation

partial_fold_xs_c<OffsetEnd::value, F, C>

fold_xs<F, C = identity>

Return: value

Folds left over a list using a mulary predicate.

The first element in the input pack as the state, use push_front<> to add state if needed.

Implementation

partial_fold_xs_c<-1, F, C>

Semantics

Equivalent to F::f<... F::f<xs[0], xs[1], ..., xs[n-1]>, xs[2], ..., xs[n-1]>, ..., xs[n-1]>, ...>

emp::partial_fold_xs<L, OffsetEnd, state, F, C = mp::identity> = unpack<L, mp::push_front<state, mp::partial_fold_xs<OffsetEnd, F, C>>>

emp::partial_fold_xs_c<L, int_ OffsetEnd, state, F, C = mp::identity> = unpack<L, mp::push_front<state, mp::partial_fold_xs_c<OffsetEnd, F, C>>>

emp::fold_xs<L, state, F, C = mp::identity> = unpack<L, mp::push_front<state, mp::fold_xs<F, C>>>

<jln/mp/algorithm/reverse_fold.hpp>

reverse_fold<F, C = identity>::f<xs...>

Return: value

Folds right over a list using a binary predicate.

The first element in the input pack as the state, use push_front<> to add state if needed.

Implementation

C::f</*...*/>

Pre-condition

  • sizeof...(xs) >= 1

Semantics

F::f<F::f<F::f<F::f<xs[0], xs[n-1]>, x[n-2]>, ...>, x[1]>

emp::reverse_fold<L, state, F, C = mp::identity> = unpack<L, mp::push_front<state, mp::reverse_fold<F, C>>>

<jln/mp/algorithm/reverse_fold_right.hpp>

reverse_fold_right<F, C = identity>::f<xs...>

Return: value

Folds right over a list using a binary predicate.

This is equivalent to reverse<fold<flip<F>, C>>.

Implementation

C::f</*...*/>

Pre-condition

  • sizeof...(xs) >= 1

Semantics

F::f<xs[n-1], F::f<..., F::f<xs[2], F::f<xs[1], xs[0]>>>>

emp::reverse_fold_right<L, state, F, C = mp::identity> = unpack<L, mp::push_front<state, mp::reverse_fold_right<F, C>>>

emp::reverse_reduce<L, F, C = mp::identity> = unpack<L, mp::reverse_fold_right<F, C>>

<jln/mp/algorithm/after.hpp>

after<Seq, TC = listify, FC = clear<TC>>

Return: sequence

Find the sequence after a sub-sequence.

Calls TC with all the elements after the sub-sequence found. If no element is found, FC is used with the whole sequence.

after<list<Ts...>, TC, FC>

emp::after<L, Seq, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::after<Seq, TC, FC>>

<jln/mp/algorithm/before.hpp>

before<Seq, TC = listify, FC = clear<TC>>

Return: sequence

Find the sequence before a sub-sequence.

Calls TC with all the elements before the sub-sequence found. If no element is found, FC is used with the whole sequence.

before<list<Ts...>, TC, FC>::f<xs...>

emp::before<L, Seq, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::before<Seq, TC, FC>>

<jln/mp/algorithm/before_after.hpp>

before_after_with<Seq, SubC1 = listify, SubC2 = SubC1, TC = listify, FC = clear<TC>>

Return: sequence

Find the sequences before and after a sub-sequence.

Calls TC with result of SubC1 and SubC2 called respectively with the sequences before and after the one found. If no element is found, FC is used with the whole sequence.

before_after<Seq, TC = listify, FC = clear<TC>>

Implementation

before_after_with<Seq, listify, listify, TC, FC>

before_after_with<list<Ts...>, SubC1, SubC2, TC, FC>::f<xs...>

emp::before_after<L, Seq, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::before_after<Seq, TC, FC>>

emp::before_after_with<L, Seq, SubC1 = mp::listify, SubC2 = SubC1, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::before_after_with<Seq, SubC1, SubC2, TC, FC>>

<jln/mp/algorithm/conjunction.hpp>

conjunction_with<Pred, C = identity>::f<xs...>

Return: value

Perform a logical AND on the sequence of value and returns the first value converted to false.

Conjunction is short-circuiting: if there is a template type argument xs[i] with bool(Pred::f<xs[i]>::value) == false, then instantiating conjunction<C>::f<xs[0], ..., xs[n-1]> does not require the instantiation of Pred::f<xs[j]>::value for j > i.

Post-condition

  • If sizeof...(xs) == 0, true_
  • If sizeof...(xs) != 0, the first type xs[i] for which bool(Pred::f<xs[i]>::value) == false, or last value if there is no such type.

Note

If you just need a boolean, all_of<Pred,C> is more appropriate.

conjunction<C = identity>

Return: value convertible to true_ / false_

Perform a logical AND on the sequence of value and returns the first value converted to false.

Conjunction is short-circuiting: if there is a template type argument xs[i] with bool(xs[i]::value) == false, then instantiating conjunction<C>::f<xs[0], ..., xs[n-1]> does not require the instantiation of xs[j]::value for j > i.

Implementation

conjunction_with<identity, C>

Post-condition

  • If sizeof...(xs) == 0, true_
  • If sizeof...(xs) != 0, the first value for which bool(xs[i]::value) == false, or last value if there is no such type.

Note

If you just need a boolean, all_of<identity,C> is more appropriate.

emp::conjunction_with<L, Pred, C = mp::identity> = unpack<L, mp::conjunction_with<Pred, C>>

emp::conjunction<L, C = mp::identity> = unpack<L, mp::conjunction_with<mp::identity, C>>

bool emp::conjunction_with_v<L, Pred, C = mp::identity> = unpack<L, mp::conjunction_with<Pred, C>>::value

bool emp::conjunction_v<L, C = mp::identity> = unpack<L, mp::conjunction_with<mp::identity, C>>::value

<jln/mp/algorithm/disjunction.hpp>

disjunction_with<Pred, C = identity>::f<xs...>

Return: value

Perform a logical OR on the sequence of value and returns the first value converted to true.

Disjunction is short-circuiting: if there is a template type argument xs[i] with bool(xs[i]::value) == true, then instantiating disjunction<C>::f<xs[0], ..., xs[n-1]> does not require the instantiation of Pred::f<xs[j]>::value for j > i

Post-condition

  • If sizeof...(xs) == 0, false_
  • If sizeof...(xs) != 0, the first type xs[i] for which bool(Pred::f<xs[i]>::value) == true, or last value if there is no such type.

Note

If you just need a boolean, any_of<Pred,C> is more appropriate.

disjunction<C = identity>

Return: value convertible to true_ / false_

Perform a logical OR on the sequence of value and returns the first value converted to true.

Disjunction is short-circuiting: if there is a template type argument xs[i] with bool(xs[i]::value) == true, then instantiating disjunction<C>::f<xs[0], ..., xs[n-1]> does not require the instantiation of xs[j]::value for j > i.

Implementation

disjunction_with<identity, C>

Post-condition

  • If sizeof...(xs) == 0, false_
  • If sizeof...(xs) != 0, the first value for which bool(xs[i]::value) == true, or last value if there is no such type.

Note

If you just need a boolean, any_of<identity,C> is more appropriate.

emp::disjunction_with<L, Pred, C = mp::identity> = unpack<L, mp::disjunction_with<Pred, C>>

emp::disjunction<L, C = mp::identity> = unpack<L, mp::disjunction_with<mp::identity, C>>

bool emp::disjunction_with_v<L, Pred, C = mp::identity> = unpack<L, mp::disjunction_with<Pred, C>>::value

bool emp::disjunction_v<L, C = mp::identity> = unpack<L, mp::disjunction_with<mp::identity, C>>::value

<jln/mp/algorithm/drop_until.hpp>

drop_until<Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Remove the first elements of a sequence that does not satisfy a predicate.

When an element satisfy the predicate, call TC with it and those that follow it. Otherwise FC is called on the whole sequence.

drop_until_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Remove the first minus at most ExtendedByN elements of a sequence that does not satisfy a predicate.

When an element satisfy the predicate, call TC with it and those that follow it plus at most ExtendedByN. Otherwise FC is called on the whole sequence.

Semantics

call<drop_while_extended_by_n_c<2, is<number<4>>>, number<0>, number<1>, number<2>, number<3>, number<4>, number<5>> // ^ -2 ^ -1 ^ found elem == list<number<2>, number<3>, number<4>, number<5>> call<drop_while_extended_by_n_c<2, is<number<1>>>, number<0>, number<1>, number<2>, number<3>, number<4>, number<5>> // ^ -1 ^ found elem == list<number<0>, number<1>>

drop_until_extended_by_n<ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Implementation

drop_until_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>

drop_inclusive_until<Pred, TC = listify, FC = clear<TC>>

Implementation

drop_until_extended_by_n_c<1, Pred, TC, FC>

emp::drop_until<L, Pred, C = mp::listify> = unpack<L, mp::drop_until<Pred, C>>

emp::drop_until_extended_by_n_c<L, std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>> = unpack<L, mp::drop_until_extended_by_n_c<ExtendedByN, Pred, TC, FC>>

emp::drop_until_extended_by_n<L, ExtendedByN, Pred, TC = listify, FC = clear<TC>> = unpack<L, mp::drop_until_extended_by_n<ExtendedByN, Pred, TC, FC>>

emp::drop_inclusive_until<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_inclusive_until<Pred, TC, FC>>

<jln/mp/algorithm/drop_until_xs.hpp>

drop_until_xs<Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Remove the first elements of a sequence that does not satisfy a predicate.

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0 Same as drop_until, but the predicate takes all the elements of the current position until the end of the list.

drop_until_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Same as drop_until_extended_by_n_c, but for drop_until_xs.

drop_until_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Implementation

drop_until_extended_by_n_xs_c<ExtendedByN::value, Pred, TC, FC>

drop_inclusive_until_xs<Pred, TC = listify, FC = clear<TC>>

Implementation

drop_until_extended_by_n_xs_c<1, Pred, TC, FC>

partial_drop_until_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Same as drop_until_extended_by_n_xs_c, but stop searching at position OffsetEnd.

OffsetEnd
a negative value start to end of sequence.

partial_drop_until_xs<OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_until_extended_by_n_xs_c<OffsetEnd::value, 0, Pred, TC, FC>

partial_drop_until_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_until_extended_by_n_xs_c<OffsetEnd, 0, Pred, TC, FC>

partial_drop_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_until_extended_by_n_xs_c<OffsetEnd::value, ExtendedByN::value, Pred, TC, FC>

partial_drop_inclusive_until_xs_c<std::size_t OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_until_extended_by_n_xs_c<OffsetEnd, 1, Pred, TC, FC>

partial_drop_inclusive_until_xs<OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_until_extended_by_n_xs_c<OffsetEnd::value, 1, Pred, TC, FC>

emp::drop_until_xs<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_until_xs<Pred, TC, FC>>

emp::drop_until_extended_by_n_xs<L, ExtendedByN, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_until_extended_by_n_xs<ExtendedByN, Pred, TC, FC>>

emp::drop_until_extended_by_n_xs_c<L, std::size_t ExtendedByN, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_until_extended_by_n_xs_c<ExtendedByN, Pred, TC, FC>>

emp::partial_drop_until_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_until_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_drop_until_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_until_xs_c<OffsetEnd, Pred, TC, FC>>

emp::drop_inclusive_until_xs<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_inclusive_until_xs<Pred, TC, FC>>

emp::partial_drop_inclusive_until_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_inclusive_until_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_drop_inclusive_until_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_inclusive_until_xs_c<OffsetEnd, Pred, TC, FC>>

emp::partial_drop_until_extended_by_n_xs<L, OffsetEnd, ExtendedByN, Pred, TC = listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, FC>>

emp::partial_drop_until_extended_by_n_xs_c<L, int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_until_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/drop_while.hpp>

drop_while<Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Remove the first elements of a sequence that satisfy a predicate.

When an element does not satisfy the predicate, call TC with it and all those that follow it. Otherwise FC is called on the whole sequence.

drop_while_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Remove the first minus at most ExtendedByN elements of a sequence that satisfy a predicate.

When an element does not satisfy the predicate, call TC with it and all those that follow it plus at most ExtendedByN. Otherwise FC is called on the whole sequence.

Semantics

call<drop_while_extended_by_n_c<2, is_not<number<4>>>, number<0>, number<1>, number<2>, number<3>, number<4>, number<5>> // ^ 2 ^ 1 ^ found elem == list<number<2>, number<3>, number<4>, number<5>> call<drop_while_extended_by_n_c<2, is_not<number<1>>>, number<0>, number<1>, number<2>, number<3>, number<4>, number<5>> // ^ 1 ^ found elem == list<number<0>, number<1>>

drop_while_extended_by_n<ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Implementation

drop_while_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>

drop_inclusive_while<Pred, TC = listify, FC = clear<TC>>

Implementation

drop_while_extended_by_n_c<1, Pred, TC, FC>

emp::drop_while<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_while<Pred, TC, FC>>

emp::drop_while_extended_by_n_c<L, std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>> = unpack<L, mp::drop_while_extended_by_n_c<ExtendedByN, Pred, TC, FC>>

emp::drop_while_extended_by_n<L, ExtendedByN, Pred, TC = listify, FC = clear<TC>> = unpack<L, mp::drop_while_extended_by_n<ExtendedByN, Pred, TC, FC>>

emp::drop_inclusive_while<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_inclusive_while<Pred, TC, FC>>

<jln/mp/algorithm/drop_while_xs.hpp>

drop_while_xs<Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Remove the first elements of a sequence that satisfy a predicate.

Same as drop_while, but the predicate takes all the elements of the current position until the end of the list.

drop_while_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Same as drop_while_extended_by_n_c, but for drop_while_xs.

drop_while_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Implementation

drop_while_extended_by_n_xs_c<ExtendedByN::value, Pred, TC, FC>

drop_inclusive_while_xs<Pred, TC = listify, FC = clear<TC>>

Implementation

drop_while_extended_by_n_xs_c<1, Pred, TC, FC>

partial_drop_while_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>::f<xs...>

Return: sequence

Same as drop_while_extended_by_n_xs_c, but stop searching at position OffsetEnd.

OffsetEnd
a negative value start to end of sequence.

partial_drop_while_xs<OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_while_extended_by_n_xs_c<OffsetEnd::value, 0, Pred, TC, FC>

partial_drop_while_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_while_extended_by_n_xs_c<OffsetEnd, 0, Pred, TC, FC>

partial_drop_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_while_extended_by_n_xs_c<OffsetEnd::value, ExtendedByN::value, Pred, TC, FC>

partial_drop_inclusive_while_xs_c<std::size_t OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_while_extended_by_n_xs_c<OffsetEnd, 1, Pred, TC, FC>

partial_drop_inclusive_while_xs<OffsetEnd, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_while_extended_by_n_xs_c<OffsetEnd::value, 1, Pred, TC, FC>

emp::drop_while_xs<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_while_xs<Pred, TC, FC>>

emp::drop_while_extended_by_n_xs<L, ExtendedByN, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_while_extended_by_n_xs<ExtendedByN, Pred, TC, FC>>

emp::drop_while_extended_by_n_xs_c<L, std::size_t ExtendedByN, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_while_extended_by_n_xs_c<ExtendedByN, Pred, TC, FC>>

emp::partial_drop_while_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_while_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_drop_while_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_while_xs_c<OffsetEnd, Pred, TC, FC>>

emp::drop_inclusive_while_xs<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::drop_inclusive_while_xs<Pred, TC, FC>>

emp::partial_drop_inclusive_while_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_inclusive_while_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_drop_inclusive_while_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_inclusive_while_xs_c<OffsetEnd, Pred, TC, FC>>

emp::partial_drop_while_extended_by_n_xs<L, OffsetEnd, ExtendedByN, Pred, TC = listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, FC>>

emp::partial_drop_while_extended_by_n_xs_c<L, int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = mp::clear<TC>> = unpack<L, mp::partial_drop_while_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/find.hpp>

find_if<Pred, TC = listify, FC = clear<TC>>

Return: sequence

Finds the first element that satisfy a predicate.

Implementation

drop_until<Pred, TC, FC>

Pre-condition

  • Pred::f<x> must return a boolean, 1 or 0 Calls TC with all the elements since the one found at the end. If no element is found, FC is used with the whole sequence.

find_if_not<Pred, TC = listify, FC = clear<TC>>

Implementation

drop_while<Pred, TC, FC>

find<T, TC = listify, FC = clear<TC>>

Implementation

find_if<is<T>, TC, FC>

emp::find_if<L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::find_if<Pred, TC, FC>>

emp::find_if_not<L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::find_if_not<Pred, TC, FC>>

emp::find<L, T, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::find_if<mp::is<T>, TC, FC>>

<jln/mp/algorithm/find_last.hpp>

find_last_if<Pred, TC = listify, FC = clear<TC>>

Return: sequence

Finds the last element that satisfy a predicate.

Calls TC with all the elements since the last found at the end. If no element is found, FC is used with the whole sequence.

Implementation

until_last_t<drop_until, Pred, TC, FC>

find_last_if_not<Pred, TC = listify, FC = clear<TC>>

Implementation

until_last_t<drop_while, Pred, TC, FC>

find_last<T, TC = listify, FC = clear<TC>>

Implementation

find_last_if<is<T>, TC, FC>

emp::find_last_if<L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::find_last_if<Pred, TC, FC>>

emp::find_last_if_not<L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::find_last_if_not<Pred, TC, FC>>

emp::find_last<L, T, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::find_last_if<mp::is<T>, TC, FC>>

<jln/mp/algorithm/index.hpp>

index_if<Pred, TC = identity, FC = size<>>::f<xs...>

Return: number

Finds the index of the first element of sequence that satisfies the predicate Pred.

Calls TC with the index found or FC with the whole sequence.

index_of<T, TC = identity, FC = size<>>

Return: number

Finds the index of the first element of sequence that is a type T.

Calls TC with the index found or FC with the whole sequence.

Implementation

index_if<is<T>, TC, FC>

index_if_xs<Pred, TC = identity, FC = size<>>::f<xs...>

Return: sequence

Search the index of first sub-sequence that satisfy a predicate.

partial_index_if_xs_c<int_ OffsetEnd, Pred, TC = identity, FC = size<>>::f<xs...>

Same as index_if_xs, but stop searching at position OffsetEnd.

OffsetEnd
a negative value start to end of sequence.

partial_index_if_xs<OffsetEnd, Pred, TC = identity, FC = size<>>

Implementation

partial_index_if_xs_c<OffsetEnd::value, Pred, TC, FC>

emp::index_if<L, Pred, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::index_if<Pred, TC, FC>>

emp::index_of<L, T, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::index_of<T, TC, FC>>

emp::index_if_xs<L, Pred, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::index_if_xs<Pred, TC, FC>>

emp::partial_index_if_xs<OffsetEnd, L, Pred, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::partial_index_if_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_index_if_xs_c<int_ OffsetEnd, L, Pred, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::partial_index_if_xs_c<OffsetEnd, Pred, TC, FC>>

bool emp::index_if_v<L, Pred, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::index_if<Pred, TC, FC>>::value

bool emp::index_of_v<L, T, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::index_of<T, TC, FC>>::value

bool emp::index_if_xs_v<L, Pred, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::index_if_xs<Pred, TC, FC>>::value

bool emp::partial_index_if_xs_v<OffsetEnd, L, Pred, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::partial_index_if_xs<OffsetEnd, Pred, TC, FC>>::value

bool emp::partial_index_if_xs_c_v<int_ OffsetEnd, L, Pred, TC = mp::identity, FC = mp::size<>> = unpack<L, mp::partial_index_if_xs_c<OffsetEnd, Pred, TC, FC>>::value

<jln/mp/algorithm/lower_bound.hpp>

lower_bound<x, Cmp = less<>, TC = listify, FC = TC>::f<xs...>

Return: sequence

Finds first element that is not less than (i.e. greater or equal to) x.

Calls TC with all the elements since the one found at the end. If no element is found, FC is used.

Pre-condition

lower_bound_c<int_ x, Cmp = less<>, TC = listify, FC = TC>

Implementation

lower_bound<number<x>, Cmp, TC, FC>

lower_bound_than<x, TC = listify, FC = TC>

Implementation

lower_bound<x, less<>, TC, FC>

lower_bound_than_c<int_ x, TC = listify, FC = TC>

Implementation

lower_bound<number<x>, less<>, TC, FC>

emp::lower_bound<L, x, Cmp = mp::less<>, TC = mp::listify, FC = TC> = unpack<L, mp::lower_bound<x, Cmp, TC, FC>>

emp::lower_bound_c<L, int_ x, Cmp = mp::less<>, TC = mp::listify, FC = TC> = unpack<L, mp::lower_bound<mp::number<x>, Cmp, TC, FC>>

emp::lower_bound_than<L, x, TC = mp::listify, FC = TC> = unpack<L, mp::lower_bound<x, mp::less<>, TC, FC>>

emp::lower_bound_than_c<L, int_ x, TC = mp::listify, FC = TC> = unpack<L, mp::lower_bound<mp::number<x>, mp::less<>, TC, FC>>

<jln/mp/algorithm/search.hpp>

search<Pred, TC = listify, FC = clear<TC>>

Return: sequence

Search the first sub-sequence that satisfy a predicate.

Implementation

drop_until_xs<Pred, TC, FC>

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0 Calls TC with all the elements from sub-sequence found at the end. If no element is found, FC is used with the whole sequence.

search_before<Pred, TC = listify, FC = clear<TC>>

Return: sequence

Search elements before sub-sequence that satisfy a predicate.

Implementation

take_until_xs<Pred, TC, FC>

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0 Calls TC with the elements from the beginning to sub-sequence found. If no element is found, FC is used with the whole sequence.

search_before_extended_by_n<ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Return: sequence

Search elements before sub-sequence that satisfy a predicate.

Implementation

take_until_extended_by_n_xs<ExtendedByN, Pred, TC, FC>

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0 Calls TC with the elements from the beginning to sub-sequence found + ExtendedByN. If no element is found, FC is used with the whole sequence.

search_before_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Implementation

take_until_extended_by_n_xs_c<ExtendedByN, Pred, TC, FC>

Return: sequence

Same search, but it stops when there is StopWhenAtLeast::value element or less.

Implementation

partial_drop_until_xs_c<-int_{StopWhenAtLeast::value}-1, Pred, TC, FC>

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0

partial_search_c<std::size_t StopWhenAtLeast, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_drop_until_xs_c<-int_{StopWhenAtLeast}-1, Pred, TC, FC>

partial_search_before<StopWhenAtLeast, Pred, TC = listify, FC = clear<TC>>

Return: sequence

Same search_before, but it stops when there is StopWhenAtLeast::value element or less.

Implementation

partial_take_until_xs_c<-int_{StopWhenAtLeast::value}-1, Pred, TC, FC>

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0

partial_search_before_c<std::size_t StopWhenAtLeast, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_take_until_xs_c<-int_{StopWhenAtLeast}-1, Pred, TC, FC>

partial_search_before_extended_by_n_c<std::size_t StopWhenAtLeast, std::size_t ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Return: sequence

Same search_before, but it stops when there is StopWhenAtLeast::value element or less.

Implementation

partial_take_until_extended_by_n_xs_c<-int_{StopWhenAtLeast}-1, ExtendedByN, Pred, TC, FC>

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0

partial_search_before_extended_by_n<StopWhenAtLeast, ExtendedByN, Pred, TC = listify, FC = clear<TC>>

Implementation

partial_take_until_extended_by_n_xs_c<-int_{StopWhenAtLeast::value}-1, ExtendedByN::value, Pred, TC, FC>

emp::search<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::search<Pred, TC, FC>>

emp::search_before<L, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::search_before<Pred, TC, FC>>

emp::search_before_extended_by_n<L, ExtendedByN, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::search_before_extended_by_n<ExtendedByN, Pred, TC, FC>>

emp::partial_search_before<L, StopWhenAtLeast, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_search_before<Pred, StopWhenAtLeast, TC, FC>>

emp::partial_search_before_extended_by_n<L, StopWhenAtLeast, ExtendedByN, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_search_before_extended_by_n<StopWhenAtLeast, ExtendedByN, Pred, TC, FC>>

emp::partial_search_c<L, std::size_t StopWhenAtLeast, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_search_c<StopWhenAtLeast, Pred, TC, FC>>

emp::partial_search_before_c<L, std::size_t StopWhenAtLeast, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_search_before_c<StopWhenAtLeast, Pred, TC, FC>>

emp::partial_search_before_extended_by_n_c<L, std::size_t StopWhenAtLeast, std::size_t ExtendedByN, Pred, TC = mp::listify, FC = mp::clear<TC>> = unpack<L, mp::partial_search_before_extended_by_n_c<StopWhenAtLeast, ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/skip_until.hpp>

skip_until<Pred, TC = listify, FC = TC>

Return: sequence

Remove the first elements of a sequence that does not satisfy a predicate.

Implementation

drop_until<Pred, TC, clear<FC>>

Pre-condition

  • Pred::f<x> must return a boolean, 1 or 0

skip_inclusive_until<Pred, TC = listify, FC = TC>

Implementation

drop_inclusive_until<Pred, TC, clear<FC>>

skip_until_extended_by_n<ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

drop_until_extended_by_n_c<ExtendedByN::value, Pred, TC, clear<FC>>

skip_until_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

drop_until_extended_by_n_c<ExtendedByN, Pred, TC, clear<FC>>

emp::skip_until<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::skip_until<Pred, TC, FC>>

emp::skip_inclusive_until<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::skip_inclusive_until<Pred, TC, FC>>

emp::skip_until_extended_by_n_c<L, std::size_t ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::skip_until_extended_by_n_c<ExtendedByN, Pred, TC, FC>>

emp::skip_until_extended_by_n<L, ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::skip_until_extended_by_n<ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/skip_until_xs.hpp>

skip_until_xs<Pred, TC = listify, FC = TC>

Return: sequence

Remove the first elements of a sequence that does not satisfy a predicate.

Implementation

drop_until_xs<Pred, TC, clear<FC>>

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0

partial_skip_until_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>

Return: sequence

Same as drop_until_xs, but stop searching at position OffsetEnd.

OffsetEnd
a negative value start to end of sequence.

Implementation

partial_drop_until_xs_c<OffsetEnd, Pred, TC, clear<FC>>

partial_skip_until_xs<OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_drop_until_xs<OffsetEnd, Pred, TC, clear<FC>>

skip_inclusive_until_xs<Pred, TC = listify, FC = TC>

Implementation

drop_inclusive_until_xs<Pred, TC, clear<FC>>

partial_skip_inclusive_until_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_drop_inclusive_until_xs_c<OffsetEnd, Pred, TC, clear<FC>>

partial_skip_inclusive_until_xs<OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_drop_inclusive_until_xs<OffsetEnd, Pred, TC, clear<FC>>

skip_until_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

drop_until_extended_by_n_xs_c<ExtendedByN, Pred, TC, clear<FC>>

skip_until_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

drop_until_extended_by_n_xs<ExtendedByN, Pred, TC, clear<FC>>

partial_skip_until_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

partial_drop_until_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>

partial_skip_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

partial_drop_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>

emp::skip_until_xs<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::skip_until_xs<Pred, TC, FC>>

emp::partial_skip_until_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_skip_until_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_skip_until_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_skip_until_xs_c<OffsetEnd, Pred, TC, FC>>

emp::skip_inclusive_until_xs<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::skip_inclusive_until_xs<Pred, TC, FC>>

emp::partial_skip_inclusive_until_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_skip_inclusive_until_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_skip_inclusive_until_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_skip_inclusive_until_xs_c<OffsetEnd, Pred, TC, FC>>

emp::skip_until_extended_by_n_xs_c<L, std::size_t ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::drop_until_extended_by_n_xs_c<ExtendedByN, Pred, TC, clear<FC>>>

emp::skip_until_extended_by_n_xs<L, ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::drop_until_extended_by_n_xs<ExtendedByN, Pred, TC, clear<FC>>>

emp::partial_skip_until_extended_by_n_xs_c<L, int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::partial_drop_until_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>>

emp::partial_skip_until_extended_by_n_xs<L, OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::partial_drop_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>>

<jln/mp/algorithm/skip_while.hpp>

skip_while<Pred, TC = listify, FC = TC>

Return: sequence

Remove the first elements of a sequence that satisfy a predicate.

Implementation

drop_while<Pred, TC, clear<FC>>

Pre-condition

  • Pred::f<x> must return a boolean, 1 or 0

skip_inclusive_while<Pred, TC = listify, FC = TC>

Implementation

drop_inclusive_while<Pred, TC, clear<FC>>

skip_while_extended_by_n<ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

drop_while_extended_by_n_c<ExtendedByN::value, Pred, TC, clear<FC>>

skip_while_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

drop_while_extended_by_n_c<ExtendedByN, Pred, TC, clear<FC>>

emp::skip_while<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::skip_while<Pred, TC, FC>>

emp::skip_inclusive_while<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::skip_inclusive_while<Pred, TC, FC>>

emp::skip_while_extended_by_n_c<L, std::size_t ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::skip_while_extended_by_n_c<ExtendedByN, Pred, TC, FC>>

emp::skip_while_extended_by_n<L, ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::skip_while_extended_by_n<ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/skip_while_xs.hpp>

skip_while_xs<Pred, TC = listify, FC = TC>

Return: sequence

Remove the first elements of a sequence that satisfy a predicate.

Implementation

drop_while_xs<Pred, TC, clear<FC>>

Pre-condition

  • Pred::f<ys...> must return a boolean, 1 or 0 Same as skip_while, but the predicate takes all the elements of the current position until the end of the list.

partial_skip_while_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>

Return: sequence

Same as skip_while_xs, but stop searching at position OffsetEnd.

OffsetEnd
a negative value start to end of sequence.

Implementation

partial_drop_while_xs_c<OffsetEnd, Pred, TC, clear<FC>>

partial_skip_while_xs<OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_drop_while_xs<OffsetEnd, Pred, TC, clear<FC>>

skip_inclusive_while_xs<Pred, TC = listify, FC = TC>

Implementation

drop_inclusive_while_xs<Pred, TC, clear<FC>>

partial_skip_inclusive_while_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_drop_inclusive_while_xs_c<OffsetEnd, Pred, TC, clear<FC>>

partial_skip_inclusive_while_xs<OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_drop_inclusive_while_xs<OffsetEnd, Pred, TC, clear<FC>>

skip_while_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

drop_while_extended_by_n_xs_c<ExtendedByN, Pred, TC, clear<FC>>

skip_while_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

drop_while_extended_by_n_xs<ExtendedByN, Pred, TC, clear<FC>>

partial_skip_while_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

partial_drop_while_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>

partial_skip_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

partial_drop_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>

emp::skip_while_xs<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::skip_while_xs<Pred, TC, FC>>

emp::partial_skip_while_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_skip_while_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_skip_while_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_skip_while_xs_c<OffsetEnd, Pred, TC, FC>>

emp::skip_inclusive_while_xs<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::skip_inclusive_while_xs<Pred, TC, FC>>

emp::partial_skip_inclusive_while_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_skip_inclusive_while_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_skip_inclusive_while_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_skip_inclusive_while_xs_c<OffsetEnd, Pred, TC, FC>>

emp::skip_while_extended_by_n_xs_c<L, std::size_t ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::drop_while_extended_by_n_xs_c<ExtendedByN, Pred, TC, clear<FC>>>

emp::skip_while_extended_by_n_xs<L, ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::drop_while_extended_by_n_xs<ExtendedByN, Pred, TC, clear<FC>>>

emp::partial_skip_while_extended_by_n_xs_c<L, int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::partial_drop_while_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>>

emp::partial_skip_while_extended_by_n_xs<L, OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::partial_drop_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, clear<FC>>>

<jln/mp/algorithm/take_until.hpp>

take_until<Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Extract the first elements of a sequence that does not satisfy a predicate.

When an element satisfy the predicate, call TC with it and those before it. Otherwise FC is called on the whole sequence.

take_until_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Extract the first plus at most ExtendedByN elements of a sequence that does not satisfy a predicate.

When an element satisfy the predicate, call TC with it and those before it plus at most ExtendedByN. Otherwise FC is called on the whole sequence.

Semantics

call<take_until_extended_by_n_c<2, is<number<2>>>, number<0>, number<1>, number<2>, number<3>, number<4>, number<5>> // predicate not satisfied ^ (+1) ^ +2 == list<number<0>, number<1>, number<2>, number<3>> call<take_until_extended_by_n_c<2, is<number<5>>>, number<0>, number<1>, number<2>, number<3>, number<4>, number<5>> // predicate not satisfied ^ (+1) == list<number<0>, number<1>, number<2>, number<3>, number<4>, number<5>>

take_until_extended_by_n<ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

take_until_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>

take_inclusive_until<Pred, TC = listify, FC = TC>

Implementation

take_until_extended_by_n_c<1, Pred, TC, FC>

emp::take_until<L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::take_until<Pred, TC, FC>>

emp::take_inclusive_until<L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::take_until_extended_by_n_c<1, Pred, TC, FC>>

emp::take_until_extended_by_n<ExtendedByN, L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::take_until_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>>

emp::take_until_extended_by_n_c<std::size_t ExtendedByN, L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::take_until_extended_by_n_c<ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/take_until_xs.hpp>

take_until_xs<Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Extracts the first elements of a sequence that does not satisfy a predicate.

take_until_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Same as take_until_extended_by_n_c, but for take_until_xs.

take_until_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

take_until_extended_by_n_xs_c<ExtendedByN::value, Pred, TC, FC>

take_inclusive_until_xs<Pred, TC = listify, FC = TC>

Implementation

take_until_extended_by_n_xs_c<1, Pred, TC, FC>

partial_take_until_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Same as take_until_extended_by_n_xs_c, but stop searching at position OffsetEnd.

OffsetEnd
a negative value start to end of sequence.

partial_take_until_xs<OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_take_until_extended_by_n_xs_c<OffsetEnd::value, 0, Pred, TC, FC>

partial_take_until_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_take_until_extended_by_n_xs_c<OffsetEnd, 0, Pred, TC, FC>

partial_take_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

partial_take_until_extended_by_n_xs_c<OffsetEnd::value, ExtendedByN::value, Pred, TC, FC>

partial_take_inclusive_until_xs_c<std::size_t OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_take_until_extended_by_n_xs_c<OffsetEnd, 1, Pred, TC, FC>

partial_take_inclusive_until_xs<OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_take_until_extended_by_n_xs_c<OffsetEnd::value, 1, Pred, TC, FC>

emp::take_until_xs<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::take_until_xs<Pred, TC, FC>>

emp::take_until_extended_by_n_xs<L, ExtendedByN, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::take_until_extended_by_n_xs<ExtendedByN, Pred, TC, FC>>

emp::take_until_extended_by_n_xs_c<L, std::size_t ExtendedByN, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::take_until_extended_by_n_xs_c<ExtendedByN, Pred, TC, FC>>

emp::partial_take_until_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_take_until_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_take_until_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_take_until_xs_c<OffsetEnd, Pred, TC, FC>>

emp::take_inclusive_until_xs<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::take_inclusive_until_xs<Pred, TC, FC>>

emp::partial_take_inclusive_until_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_take_inclusive_until_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_take_inclusive_until_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_take_inclusive_until_xs_c<OffsetEnd, Pred, TC, FC>>

emp::partial_take_until_extended_by_n_xs<L, OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::partial_take_until_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, FC>>

emp::partial_take_until_extended_by_n_xs_c<L, int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::partial_take_until_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/take_while.hpp>

take_while<Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Extract the first elements of a sequence that satisfy a predicate.

When an element does not satisfy the predicate, call TC with it and those before it. Otherwise FC is called on the whole sequence.

take_while_extended_by_n_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Extract the first plus at most ExtendedByN elements of a sequence that satisfy a predicate.

When an element satisfy the predicate, call TC with it and those before it plus at most ExtendedByN. Otherwise FC is called on the whole sequence.

Semantics

call<take_while_extended_by_n_c<2, is_not<number<2>>>, number<0>, number<1>, number<2>, number<3>, number<4>, number<5>> // predicate not satisfied ^ (+1) ^ +2 == list<number<0>, number<1>, number<2>, number<3>> call<take_while_extended_by_n_c<2, is_not<number<5>>>, number<0>, number<1>, number<2>, number<3>, number<4>, number<5>> // predicate not satisfied ^ (+1) == list<number<0>, number<1>, number<2>, number<3>, number<4>, number<5>>

take_while_extended_by_n<ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

take_while_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>

take_inclusive_while<Pred, TC = listify, FC = TC>

Implementation

take_while_extended_by_n_c<1, Pred, TC, FC>

emp::take_while<L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::take_while<Pred, TC, FC>>

emp::take_inclusive_while<L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::take_while_extended_by_n_c<1, Pred, TC, FC>>

emp::take_while_extended_by_n<ExtendedByN, L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::take_while_extended_by_n_c<ExtendedByN::value, Pred, TC, FC>>

emp::take_while_extended_by_n_c<std::size_t ExtendedByN, L, Pred, TC = mp::listify, FC = clear<TC>> = unpack<L, mp::take_while_extended_by_n_c<ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/take_while_xs.hpp>

take_while_xs<Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Extracts the first elements of a sequence that satisfy a predicate.

take_while_extended_by_n_xs_c<std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Same as take_while_extended_by_n_c, but for take_while_xs.

take_while_extended_by_n_xs<ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

take_while_extended_by_n_xs_c<ExtendedByN::value, Pred, TC, FC>

take_inclusive_while_xs<Pred, TC = listify, FC = TC>

Implementation

take_while_extended_by_n_xs_c<1, Pred, TC, FC>

partial_take_while_extended_by_n_xs_c<int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC>::f<xs...>

Return: sequence

Same as take_while_extended_by_n_xs_c, but stop searching at position OffsetEnd.

OffsetEnd
a negative value start to end of sequence.

partial_take_while_xs<OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_take_while_extended_by_n_xs_c<OffsetEnd::value, 0, Pred, TC, FC>

partial_take_while_xs_c<int_ OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_take_while_extended_by_n_xs_c<OffsetEnd, 0, Pred, TC, FC>

partial_take_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC>

Implementation

partial_take_while_extended_by_n_xs_c<OffsetEnd::value, ExtendedByN::value, Pred, TC, FC>

partial_take_inclusive_while_xs_c<std::size_t OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_take_while_extended_by_n_xs_c<OffsetEnd, 1, Pred, TC, FC>

partial_take_inclusive_while_xs<OffsetEnd, Pred, TC = listify, FC = TC>

Implementation

partial_take_while_extended_by_n_xs_c<OffsetEnd::value, 1, Pred, TC, FC>

emp::take_while_xs<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::take_while_xs<Pred, TC, FC>>

emp::take_while_extended_by_n_xs<L, ExtendedByN, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::take_while_extended_by_n_xs<ExtendedByN, Pred, TC, FC>>

emp::take_while_extended_by_n_xs_c<L, std::size_t ExtendedByN, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::take_while_extended_by_n_xs_c<ExtendedByN, Pred, TC, FC>>

emp::partial_take_while_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_take_while_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_take_while_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_take_while_xs_c<OffsetEnd, Pred, TC, FC>>

emp::take_inclusive_while_xs<L, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::take_inclusive_while_xs<Pred, TC, FC>>

emp::partial_take_inclusive_while_xs<L, OffsetEnd, state, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_take_inclusive_while_xs<OffsetEnd, Pred, TC, FC>>

emp::partial_take_inclusive_while_xs_c<L, int_ OffsetEnd, Pred, TC = mp::listify, FC = TC> = unpack<L, mp::partial_take_inclusive_while_xs_c<OffsetEnd, Pred, TC, FC>>

emp::partial_take_while_extended_by_n_xs<L, OffsetEnd, ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::partial_take_while_extended_by_n_xs<OffsetEnd, ExtendedByN, Pred, TC, FC>>

emp::partial_take_while_extended_by_n_xs_c<L, int_ OffsetEnd, std::size_t ExtendedByN, Pred, TC = listify, FC = TC> = unpack<L, mp::partial_take_while_extended_by_n_xs_c<OffsetEnd, ExtendedByN, Pred, TC, FC>>

<jln/mp/algorithm/upper_bound.hpp>

upper_bound<x, Cmp = less<>, TC = listify, FC = TC>

Return: sequence

Finds first element that is greater that x.

Invokes TC with all the elements since the one found at the end. If no element is found, FC is used.

Implementation

lower_bound<x, flip<tee<Cmp, not_<>>>, TC, FC>

Pre-condition

upper_bound_c<int_ x, Cmp = less<>, TC = listify, FC = TC>

Implementation

upper_bound<number<x>, Cmp, TC, FC>

upper_bound_than<x, TC = listify, FC = TC>

Implementation

upper_bound<x, less<>, TC, FC>

upper_bound_than_c<int_ x, TC = listify, FC = TC>

Implementation

upper_bound<number<x>, less<>, TC, FC>

emp::upper_bound<L, x, Cmp = mp::less<>, TC = mp::listify, FC = TC> = unpack<L, mp::upper_bound<x, Cmp, TC, FC>>

emp::upper_bound_c<L, int_ x, Cmp = mp::less<>, TC = mp::listify, FC = TC> = unpack<L, mp::upper_bound<mp::number<x>, Cmp, TC, FC>>

emp::upper_bound_than<L, x, TC = mp::listify, FC = TC> = unpack<L, mp::upper_bound<x, mp::less<>, TC, FC>>

emp::upper_bound_than_c<L, int_ x, TC = mp::listify, FC = TC> = unpack<L, mp::upper_bound<mp::number<x>, mp::less<>, TC, FC>>

Group: set

<jln/mp/set/set_contains.hpp>

set_contains<x, C = identity>::f<xs...>

Return: true_ / false_

Checks if x is an element of the set whose elements are xs.

Implementation

C::f<number<emp::set_contains_xs_v<x, xs...>>>

Pre-condition

set_not_contains<x, C = identity>

Return: true_ / false_

Checks if x is not an element of the set whose elements are xs.

Implementation

set_contains<x, not_<C>>

Pre-condition

set_all_contains<x, C = identity>::f<Sets...>

Return: true_ / false_

Checks if x is an element of all set Sets.

Implementation

C::f<number<emp::set_all_contains_v<x, Sets...>>>

Pre-condition

set_any_contains<x, C = identity>::f<Sets...>

Return: true_ / false_

Checks if x is an element of any set Sets.

Implementation

C::f<number<emp::set_any_contains_v<x, Sets...>>>

Pre-condition

set_none_contains<x, C = identity>::f<Sets...>

Return: true_ / false_

Checks if x is an element of none set Sets.

Implementation

C::f<number<!emp::set_any_contains_v<x, Sets...>>>

Pre-condition

bool emp::set_contains_xs_v<x, xs...> = /*...*/

bool emp::set_contains_v<Set, x> = /*...*/

bool emp::set_all_contains_v<x, Sets...> = /*...*/

bool emp::set_any_contains_v<x, Sets...> = /*...*/

bool emp::set_none_contains_v<x, Sets...> = !set_any_contains_v<x, Sets...>

emp::set_contains<Set, x> = number<set_contains_v<Set, x>>

emp::set_not_contains<Set, x> = number<!set_contains_v<Set, x>>

emp::set_all_contains<x, Sets...> = number<set_all_contains_v<x, Sets...>>

emp::set_any_contains<x, Sets...> = number<set_any_contains_v<x, Sets...>>

emp::set_none_contains<x, Sets...> = number<!set_any_contains_v<x, Sets...>>

<jln/mp/set/set_difference.hpp>

set_difference<C = listify>::f<L, Sets...>

Return: set

Removes the elements of the list L that appear in any of the sets Sets.

Pre-condition

Post-condition

emp::set_difference<L, Sets...> = /*...*/

<jln/mp/set/set_find.hpp>

set_find<x, TC = identity, FC = always<na>>::f<xs...>

Return: value

Finds the element x in the set.

Calls TC with element found. If no element is found, FC is used with the whole set.

Pre-condition

set_find_or_else<x, FC>

Implementation

set_find<x, identity, FC>

set_find_or<x, FT>

Implementation

set_find<x, identity, always<FT>>

emp::set_find<L, x, TC = mp::identity, FC = mp::always<na>> = unpack<L, mp::set_find<x, TC, FC>>

emp::set_find_or_else<L, x, FC> = unpack<L, mp::set_find<x, mp::identity, FC>>

emp::set_find_or<L, x, FT> = unpack<L, mp::set_find<x, mp::identity, mp::always<FT>>>

<jln/mp/set/set_intersection.hpp>

set_intersection<C = listify>::f<L, Sets...>

Return: set

Returns a set that contains the elements that occur in all of the sets Sets.

Pre-condition

Post-condition

emp::set_intersection<L, Sets...> = /*...*/

<jln/mp/set/set_push_back.hpp>

set_push_back<x, C = listify>::f<xs...>

Return: set

Appends x to the end of the set whose elements are xs if not already in xs.

Pre-condition

Post-condition

emp::set_push_back<Set, x> = /*...*/

<jln/mp/set/set_push_back_elements.hpp>

set_push_back_elements<C = listify>::f<Set, xs...>

Return: set

Appends to the end of the set Set the elements of xs which are not already in Set.

Pre-condition

Post-condition

Semantics

Equivalent to fold<lift<emp::set_push_back>>::f<xs...>

emp::set_push_back_elements<Set, xs...> = mp::set_push_back_elements<>::f<Set, xs...>

<jln/mp/set/set_push_front.hpp>

set_push_front<x, C = listify>::f<xs...>

Return: set

Appends x to the beginning of the set whose elements are xs if not already in xs.

Pre-condition

Post-condition

emp::set_push_front<Set, x> = /*...*/

<jln/mp/set/set_push_front_elements.hpp>

set_push_front_elements<C = listify>::f<Set, xs...>

Return: set

Appends to the beginning of the set Set the elements of xs which are not already in Set.

Pre-condition

Post-condition

Semantics

Equivalent to fold<lift<emp::set_push_front>>::f<xs...>

emp::set_push_front_elements<Set, xs...> = mp::set_push_front_elements<>::f<Set, xs...>

<jln/mp/set/set_union.hpp>

set_union<C = listify>::f<Set, Ls...>

Return: set

Appends to the end of the set Set the elements of Ls which are not already in Set.

Implementation

unpack<set_push_back_elements<C>>::f<emp::join<Ls...>, Set>

Pre-condition

Post-condition

emp::set_union<Set, Ls...> = mp::set_union<>::f<Set, Ls...>

Group: trait

<jln/mp/utility/alignof.hpp>

alignof_<C = identity>::f<x>

Return: number

Wrapper for alignof keyword

Implementation

C::f<number<alignof(x)>>

emp::alignof_<x> = number<alignof(x)>

<jln/mp/utility/stl_traits.hpp>

traits::extent<C = identity>::f<x, i>

Implementation

C::f<std::extent<x, i::value>::type>

traits::emp::extent<x, i = number<0>>

Implementation

std::extent<x, i::value>::type

traits::is_nothrow_convertible<C = identity>::f<xs...>

Implementation

C::f<std::bool_constant<std::is_nothrow_convertible_v<xs...>>>

traits::emp::is_nothrow_convertible<xs...>

Implementation

std::bool_constant<std::is_nothrow_convertible_v<xs...>>

traits::is_nothrow_convertible<identity>::f<xs...>

Implementation

std::bool_constant<std::is_nothrow_convertible_v<xs...>>

traits::aligned_storage<C = identity>::f<Len, Alignment...>

Implementation

C::f<std::aligned_storage<Len::value, Alignment::value...>::type>

traits::emp::aligned_storage<Len, Alignment...>

Implementation

std::aligned_storage<Len::value, Alignment::value...>::type

traits::aligned_union<C = identity>::f<len, xs...>

Implementation

C::f<std::aligned_union<len::value, xs...>::type>

traits::emp::aligned_union<len, xs...>

Implementation

std::aligned_union<len::value, xs...>::type

<jln/mp/utility/has_type.hpp>

has_type<C = identity>::f<x>

Return: true_ / false_

Checks whether x has a type member.

Implementation

C::f</*...*/>

emp::has_type<x> = /*...*/

bool emp::has_type_v<x> = /*...*/

<jln/mp/utility/has_value_type.hpp>

has_value_type<C = identity>::f<x>

Return: true_ / false_

Checks whether x has a type member.

Implementation

C::f</*...*/>

emp::has_value_type<x> = /*...*/

bool emp::has_value_type_v<x> = /*...*/

<jln/mp/utility/is_specialization_of.hpp>

is_specialization_of<template<class...> Tpl, C = identity>::f<x>

Return: true_ / false_

Checks whether x is Tpl<xs...>

Implementation

C::f<number<emp::is_specialization_of_v<Tpl, x>>>

bool emp::is_specialization_of_v<template<class...> Tpl, T> = false

emp::is_specialization_of<template<class...> Tpl, x> = number<emp::is_specialization_of_v<Tpl, x>>

<jln/mp/utility/sizeof.hpp>

sizeof_<C = identity>::f<x>

Return: number

Wrapper for sizeof keyword

Implementation

C::f<number<sizeof(x)>>

emp::sizeof_<x> = number<sizeof(x)>

<jln/mp/utility/type.hpp>

type_<C = identity>::f<x>

Return: value

Function for x::type.

Implementation

C::f<x::type>

emp::type_<x> = x::type

<jln/mp/utility/value_type.hpp>

value_type<C = identity>::f<x>

Return: value

Function for x::value_type.

Implementation

C::f<x::value_type>

value_type<identity>::f<x>

Implementation

x::value_type

emp::value_type<x> = x::value_type

Group: utility

<jln/mp/utility/always.hpp>

always<x, C = identity>::f<xs...>

Return: value

Always evaluate at an arbitrary value.

Implementation

C::f<x>

Post-condition

  • result = x

<jln/mp/utility/conditional.hpp>

conditional_c<bool>

conditional_c<true>::f<true_value, false_value>

Implementation

true_value

conditional_c<false>::f<true_value, false_value>

Implementation

false_value

conditional<bool_>

Implementation

conditional_c<bool(bool_::value)>

emp::conditional<bool_, true_value, false_value> = mp::conditional_c<bool(bool_::value)>::f<true_value, false_value>

emp::conditional_c<bool bool_, true_value, false_value> = mp::conditional_c<bool_>::f<true_value, false_value>

<jln/mp/utility/is.hpp>

is<T, C = identity>::f<x>

Return: true_ / false_

Implementation

C::f<number<std::is_same_v<T, x>>>

<jln/mp/utility/is_not.hpp>

is_not<T, C = identity>

Return: true_ / false_

Implementation

is<T, not_<C>>

<jln/mp/utility/iterate.hpp>

iterate_c<uint_ n, F, C = identity>::f<x>

Return: value

Apply a function n times to its argument.

Implementation

C::f</*...*/>

iterate<n, F, C = identity>

Return: value

Apply a function n times to its argument.

Implementation

iterate_c<n::value, F, C>

emp::iterate<L, n, F, C = mp::identity> = unpack<L, mp::iterate<n, F, C>>

emp::iterate_c<L, uint_ n, F, C = mp::identity> = unpack<L, mp::iterate_c<n, F, C>>

<jln/mp/utility/rewrap_unpack.hpp>

rewrap_unpack<C>::f<L, xs...>

Return: sequence

Rewrap result of unpack<C> in the same type as L.

Semantics

rewrap_unpack<C>::f<L, xs...> == unpack<emp::wraper<L>>::f<unpack<C>::f<L, xs...>> rewrap_unpack<remove<b>>::f<std::tuple<a, b, c>, d, e> == std::tuple<d, e, a, c>

rewrap_unpack_append<C>::f<L, xs...>

Return: sequence

Rewrap result of unpack_append<C> in the same type as L.

Semantics

rewrap_unpack_append<C>::f<L, xs...> == unpack<emp::wraper<L>>::f<unpack_append<C>::f<L, xs...>> rewrap_unpack<remove<b>>::f<std::tuple<a, b, c>, d, e> == std::tuple<a, c, d, e>

emp::rewrap_unpack<L, C, xs...> = /*...*/

emp::rewrap_unpack_append<L, C, xs...> = /*...*/

<jln/mp/utility/unpack.hpp>

unpack<C>::f<seq, xs...>

Return: sequence

Turns a typelist into a sequence of those types.

Semantics

unpack<F>::f<typelist<xs...>, ys...> == F::f<ys..., xs...>

unpack_append<C>::f<seq, xs...>

Return: sequence

Turns a typelist into a sequence of those types.

Semantics

unpack_append<F>::f<typelist<xs...>, ys...> == F::f<xs..., ys...>

unpack_v<C>::f<seq, xs...>

Return: sequence

Turns a typelist into a sequence of those types.

Semantics

unpack<F>::f<valuelist<xs...>, ys...> == F::f<ys..., xs...>

unpack_append_v<C>::f<seq, xs...>

Return: sequence

Turns a typelist into a sequence of those types.

Semantics

unpack_append<F>::f<valuelist<xs...>, ys...> == F::f<xs..., ys...>

emp::unpack<L, C, xs...> = /*...*/

emp::unpack_append<L, C, xs...> = /*...*/

emp::unpack_c<L, C, int_... xs> = /*...*/

emp::unpack_append_c<L, C, int_... xs> = /*...*/

emp::unpack_v<L, C, xs...> = /*...*/

emp::unpack_append_v<L, C, xs...> = /*...*/

emp::unpack_c_v<L, C, int_... xs> = /*...*/

emp::unpack_append_c_v<L, C, int_... xs> = /*...*/

<jln/mp/utility/wrapper.hpp>

emp::wrapper<L> = /*...*/

emp::rewrap<L, xs...> = wrapper<L>::f<xs...>

Group: value

<jln/mp/value/as_val.hpp>

as_val<C = identity>::f<x>

Return: true_ / false_

Converts x to val.

Implementation

C::f<val<x::value>>

Pre-condition

emp::as_val<x, C = mp::identity> = mp::as_val<C>::f<x>

<jln/mp/value/has_value.hpp>

has_value<C = identity>::f<x>

Return: true_ / false_

Checks whether x has a value member.

Implementation

C::f</*...*/>

emp::has_value<x> = /*...*/

bool emp::has_value_v<x> = /*...*/

<jln/mp/value/is_val.hpp>

is_val<C = identity>::f<x>

Return: true_ / false_

Checks whether x is a val.

Implementation

C::f<number<emp::is_val_v<x>>>

bool emp::is_val_v<x> = false

emp::is_val<x> = number<emp::is_val_v<x>>

<jln/mp/value/val.hpp>

val<auto v>::value

Implementation

v

typed_value<T, T v>

Implementation

val<v>

value_from<T>

Implementation

val<T::value>

<jln/mp/value/operators.hpp>

val_or<C = identity>::f<xs...>

Implementation

C::f<val<(xs::value || ... || false)>>

val_left_or<C = identity>::f<xs...>

Implementation

C::f<val<(false || ... || xs::value)>>

val_and<C = identity>::f<xs...>

Implementation

C::f<val<(xs::value && ... && true)>>

val_left_and<C = identity>::f<xs...>

Implementation

C::f<val<(true && ... && xs::value)>>

val_add<C = identity>::f<xs...>

Implementation

C::f<val<(xs::value + ...)>>

val_add0<C = identity>

Implementation

if_<size<>, val_add<C>, always<val<0>, C>>

val_left_add<C = identity>::f<xs...>

Implementation

C::f<val<(... + xs::value)>>

val_left_add0<C = identity>

Implementation

if_<size<>, val_left_add<C>, always<val<0>, C>>

val_sub<C = identity>::f<xs...>

Implementation

C::f<val<(... - xs::value)>>

val_sub0<C = identity>

Implementation

if_<size<>, val_sub<C>, always<val<0>, C>>

val_lshift<C = identity>::f<xs...>

Implementation

C::f<val<(... << xs::value)>>

val_lshift0<C = identity>

Implementation

if_<size<>, val_lshift<C>, always<val<0>, C>>

val_rshift<C = identity>::f<xs...>

Implementation

C::f<val<(... >> xs::value)>>

val_rshift0<C = identity>

Implementation

if_<size<>, val_rshift<C>, always<val<0>, C>>

val_mul<C = identity>::f<xs...>

Implementation

C::f<val<(xs::value * ...)>>

val_mul0<C = identity>

Implementation

if_<size<>, val_mul<C>, always<val<0>, C>>

val_mul1<C = identity>

Implementation

if_<size<>, val_mul<C>, always<val<1>, C>>

val_left_mul<C = identity>::f<xs...>

Implementation

C::f<val<(... * xs::value)>>

val_left_mul0<C = identity>

Implementation

if_<size<>, val_left_mul<C>, always<val<0>, C>>

val_left_mul1<C = identity>

Implementation

if_<size<>, val_left_mul<C>, always<val<1>, C>>

val_div<C = identity>::f<xs...>

Implementation

C::f<val<(... / xs::value)>>

val_div0<C = identity>

Implementation

if_<size<>, val_div<C>, always<val<0>, C>>

val_div1<C = identity>

Implementation

if_<size<>, val_div<C>, always<val<1>, C>>

val_mod<C = identity>::f<xs...>

Implementation

C::f<val<(... % xs::value)>>

val_mod0<C = identity>

Implementation

if_<size<>, val_mod<C>, always<val<0>, C>>

val_mod1<C = identity>

Implementation

if_<size<>, val_mod<C>, always<val<1>, C>>

val_xor<C = identity>::f<xs...>

Implementation

C::f<val<(xs::value ^ ...)>>

val_xor0<C = identity>

Implementation

if_<size<>, val_xor<C>, always<val<0>, C>>

val_left_xor<C = identity>::f<xs...>

Implementation

C::f<val<(... ^ xs::value)>>

val_left_xor0<C = identity>

Implementation

if_<size<>, val_left_xor<C>, always<val<0>, C>>

val_bit_and<C = identity>::f<xs...>

Implementation

C::f<val<(xs::value & ...)>>

val_bit_and0<C = identity>

Implementation

if_<size<>, val_bit_and<C>, always<val<0>, C>>

val_left_bit_and<C = identity>::f<xs...>

Implementation

C::f<val<(... & xs::value)>>

val_left_bit_and0<C = identity>

Implementation

if_<size<>, val_bit_and<C>, always<val<0>, C>>

val_bit_or<C = identity>::f<xs...>

Implementation

C::f<val<(xs::value | ...)>>

val_bit_or0<C = identity>

Implementation

if_<size<>, val_bit_or<C>, always<val<0>, C>>

val_left_bit_or<C = identity>::f<xs...>

Implementation

C::f<val<(... | xs::value)>>

val_left_bit_or0<C = identity>

Implementation

if_<size<>, val_left_bit_or<C>, always<val<0>, C>>

val_neg<C = identity>::f<x>

Implementation

C::f<val<(-x::value)>>

val_unary_plus<C = identity>::f<x>

Implementation

C::f<val<(+x::value)>>

val_not<C = identity>::f<x>

Implementation

C::f<val<(!x::value)>>

val_bit_not<C = identity>::f<x>

Implementation

C::f<val<(~x::value)>>

val_inc<C = identity>::f<x>

Implementation

C::f<val<(x::value+1)>>

val_dec<C = identity>::f<x>

Implementation

C::f<val<(x::value-1)>>

val_equal<C = identity>::f<x, y>

Implementation

C::f<val<(x::value == y::value)>>

val_not_equal<C = identity>::f<x, y>

Implementation

C::f<val<(x::value != y::value)>>

val_less<C = identity>::f<x, y>

Implementation

C::f<val<(x::value < y::value)>>

val_less_equal<C = identity>::f<x, y>

Implementation

C::f<val<(x::value <= y::value)>>

val_greater<C = identity>::f<x, y>

Implementation

C::f<val<(x::value > y::value)>>

val_greater_equal<C = identity>::f<x, y>

Implementation

C::f<val<(x::value >= y::value)>>

val_equal_to<N, C = identity>

Implementation

push_back<N, val_equal<C>>

val_not_equal_to<N, C = identity>

Implementation

push_back<N, val_not_equal<C>>

val_less_than<N, C = identity>

Implementation

push_back<N, val_less<C>>

val_less_equal_than<N, C = identity>

Implementation

push_back<N, val_less_equal<C>>

val_greater_than<N, C = identity>

Implementation

push_back<N, val_greater<C>>

val_greater_equal_than<N, C = identity>

Implementation

push_back<N, val_greater_equal<C>>

val_equal_to_c<auto x, C = identity>

Implementation

val_equal_to<val<x>, C>

val_not_equal_to_c<auto x, C = identity>

Implementation

val_not_equal_to<val<x>, C>

val_less_than_c<auto x, C = identity>

Implementation

val_less_than<val<x>, C>

val_less_equal_than_c<auto x, C = identity>

Implementation

val_less_equal_than<val<x>, C>

val_greater_than_c<auto x, C = identity>

Implementation

val_greater_than<val<x>, C>

val_greater_equal_than_c<auto x, C = identity>

Implementation

val_greater_equal_than<val<x>, C>

emp::val_or_seq<L, C = mp::identity> = unpack<L, mp::val_or<C>>

emp::val_and_seq<L, C = mp::identity> = unpack<L, mp::val_and<C>>

emp::val_left_or_seq<L, C = mp::identity> = unpack<L, mp::val_left_or<C>>

emp::val_left_and_seq<L, C = mp::identity> = unpack<L, mp::val_left_and<C>>

emp::val_add_seq<L, C = mp::identity> = unpack<L, mp::val_add<C>>

emp::val_add0_seq<L, C = mp::identity> = unpack<L, mp::val_add0<C>>

emp::val_left_add_seq<L, C = mp::identity> = unpack<L, mp::val_left_add<C>>

emp::val_left_add0_seq<L, C = mp::identity> = unpack<L, mp::val_left_add0<C>>

emp::val_sub_seq<L, C = mp::identity> = unpack<L, mp::val_sub<C>>

emp::val_sub0_seq<L, C = mp::identity> = unpack<L, mp::val_sub0<C>>

emp::val_lshift_seq<L, C = mp::identity> = unpack<L, mp::val_lshift<C>>

emp::val_lshift0_seq<L, C = mp::identity> = unpack<L, mp::val_lshift0<C>>

emp::val_rshift_seq<L, C = mp::identity> = unpack<L, mp::val_rshift<C>>

emp::val_rshift0_seq<L, C = mp::identity> = unpack<L, mp::val_rshift0<C>>

emp::val_mul_seq<L, C = mp::identity> = unpack<L, mp::val_mul<C>>

emp::val_mul0_seq<L, C = mp::identity> = unpack<L, mp::val_mul0<C>>

emp::val_mul1_seq<L, C = mp::identity> = unpack<L, mp::val_mul1<C>>

emp::val_left_mul_seq<L, C = mp::identity> = unpack<L, mp::val_left_mul<C>>

emp::val_left_mul0_seq<L, C = mp::identity> = unpack<L, mp::val_left_mul0<C>>

emp::val_left_mul1_seq<L, C = mp::identity> = unpack<L, mp::val_left_mul1<C>>

emp::val_div_seq<L, C = mp::identity> = unpack<L, mp::val_div<C>>

emp::val_div0_seq<L, C = mp::identity> = unpack<L, mp::val_div0<C>>

emp::val_div1_seq<L, C = mp::identity> = unpack<L, mp::val_div1<C>>

emp::val_mod_seq<L, C = mp::identity> = unpack<L, mp::val_mod<C>>

emp::val_mod0_seq<L, C = mp::identity> = unpack<L, mp::val_mod0<C>>

emp::val_mod1_seq<L, C = mp::identity> = unpack<L, mp::val_mod1<C>>

emp::val_xor_seq<L, C = mp::identity> = unpack<L, mp::val_xor<C>>

emp::val_xor0_seq<L, C = mp::identity> = unpack<L, mp::val_xor0<C>>

emp::val_left_xor_seq<L, C = mp::identity> = unpack<L, mp::val_left_xor<C>>

emp::val_left_xor0_seq<L, C = mp::identity> = unpack<L, mp::val_left_xor0<C>>

emp::val_bit_and_seq<L, C = mp::identity> = unpack<L, mp::val_bit_and<C>>

emp::val_bit_and0_seq<L, C = mp::identity> = unpack<L, mp::val_bit_and0<C>>

emp::val_left_bit_and_seq<L, C = mp::identity> = unpack<L, mp::val_left_bit_and<C>>

emp::val_left_bit_and0_seq<L, C = mp::identity> = unpack<L, mp::val_left_bit_and0<C>>

emp::val_bit_or_seq<L, C = mp::identity> = unpack<L, mp::val_bit_or<C>>

emp::val_bit_or0_seq<L, C = mp::identity> = unpack<L, mp::val_bit_or0<C>>

emp::val_left_bit_or_seq<L, C = mp::identity> = unpack<L, mp::val_left_bit_or<C>>

emp::val_left_bit_or0_seq<L, C = mp::identity> = unpack<L, mp::val_left_bit_or0<C>>

emp::val_or_c<auto... xs> = val<(xs || ... || false)>

emp::val_and_c<auto... xs> = val<(xs && ... && true)>

emp::val_left_or_c<auto... xs> = val<(false || ... || xs)>

emp::val_left_and_c<auto... xs> = val<(true && ... && xs)>

emp::val_add_c<auto... xs> = val<(xs + ...)>

emp::val_add0_c<auto... xs> = val_add_c<xs..., 0>

emp::val_left_add_c<auto... xs> = val<(... + xs)>

emp::val_left_add0_c<auto... xs> = val_left_add_c<xs..., 0>

emp::val_sub_c<auto... xs> = val<(... - xs)>

emp::val_sub0_c<auto... xs> = val_sub_c<xs..., 0>

emp::val_lshift_c<auto... xs> = val<(... << xs)>

emp::val_lshift0_c<auto... xs> = val_lshift_c<xs..., 0>

emp::val_rshift_c<auto... xs> = val<(... >> xs)>

emp::val_rshift0_c<auto... xs> = val_rshift_c<xs..., 0>

emp::val_mul_c<auto... xs> = val<(xs * ...)>

emp::val_mul0_c<auto... xs> = val_mul_c<xs..., (sizeof...(xs) ? 1 : 0)>

emp::val_mul1_c<auto... xs> = val_mul_c<xs..., 1>

emp::val_left_mul_c<auto... xs> = val<(... * xs)>

emp::val_left_mul0_c<auto... xs> = val_left_mul_c<xs..., (sizeof...(xs) ? 1 : 0)>

emp::val_left_mul1_c<auto... xs> = val_left_mul_c<xs..., 1>

emp::val_div_c<auto... xs> = val<(... / xs)>

emp::val_div0_c<auto... xs> = val_div_c<xs..., (sizeof...(xs) ? 1 : 0)>

emp::val_div1_c<auto... xs> = val_div_c<xs..., 1>

emp::val_mod_c<auto... xs> = val<(... % xs)>

emp::val_or<xs...> = val<(xs::value || ... || false)>

emp::val_and<xs...> = val<(xs::value && ... && true)>

emp::val_left_or<xs...> = val<(false || ... || xs::value)>

emp::val_left_and<xs...> = val<(true && ... && xs::value)>

emp::val_add<xs...> = val<(xs::value + ...)>

emp::val_add0<xs...> = mp::val_add0<>::f<xs...>

emp::val_left_add<xs...> = val<(... + xs::value)>

emp::val_left_add0<xs...> = mp::val_add0<>::f<xs...>

emp::val_sub<xs...> = val<(... - xs::value)>

emp::val_sub0<xs...> = mp::val_sub0<>::f<xs...>

emp::val_lshift<xs...> = val<(... << xs::value)>

emp::val_lshift0<xs...> = mp::val_lshift0<>::f<xs...>

emp::val_rshift<xs...> = val<(... >> xs::value)>

emp::val_rshift0<xs...> = mp::val_rshift0<>::f<xs...>

emp::val_mul<xs...> = val<(xs::value * ...)>

emp::val_mul0<xs...> = mp::val_mul0<>::f<xs...>

emp::val_mul1<xs...> = mp::val_mul1<>::f<xs...>

emp::val_left_mul<xs...> = val<(... * xs::value)>

emp::val_left_mul0<xs...> = mp::val_left_mul0<>::f<xs...>

emp::val_left_mul1<xs...> = mp::val_left_mul1<>::f<xs...>

emp::val_div<xs...> = val<(... / xs::value)>

emp::val_div0<xs...> = mp::val_div0<>::f<xs...>

emp::val_div1<xs...> = mp::val_div1<>::f<xs...>

emp::val_mod<xs...> = val<(... % xs::value)>

emp::val_mod0<xs...> = mp::val_mod0<>::f<xs...>

emp::val_mod1<xs...> = mp::val_mod1<>::f<xs...>

emp::val_xor_<xs...> = val<(xs::value ^ ...)>

emp::val_xor0<xs...> = mp::val_xor0<>::f<xs...>

emp::val_left_xor<xs...> = val<(... ^ xs::value)>

emp::val_left_xor0<xs...> = mp::val_left_xor0<>::f<xs...>

emp::val_bit_and<xs...> = val<(xs::value & ...)>

emp::val_bit_and0<xs...> = mp::val_bit_and0<>::f<xs...>

emp::val_left_bit_and<xs...> = val<(... & xs::value)>

emp::val_left_bit_and0<xs...> = mp::val_left_bit_and0<>::f<xs...>

emp::val_bit_or<xs...> = val<(xs::value | ...)>

emp::val_bit_or0<xs...> = mp::val_bit_or0<>::f<xs...>

emp::val_left_bit_or<xs...> = val<(... | xs::value)>

emp::val_left_bit_or0<xs...> = mp::val_left_bit_or0<>::f<xs...>

emp::val_neg<x, C = mp::identity> = mp::val_neg<C>::f<x>

emp::val_unary_plus<x, C = mp::identity> = mp::val_unary_plus<C>::f<x>

emp::val_not<x, C = mp::identity> = mp::val_not<C>::f<x>

emp::val_bit_not<x, C = mp::identity> = mp::val_bit_not<C>::f<x>

emp::val_inc<x, C = mp::identity> = mp::val_inc<C>::f<x>

emp::val_dec<x, C = mp::identity> = mp::val_dec<C>::f<x>

emp::val_equal<x, y, C = mp::identity> = mp::val_equal<C>::f<x, y>

emp::val_not_equal<x, y, C = mp::identity> = mp::val_not_equal<C>::f<x, y>

emp::val_less<x, y, C = mp::identity> = mp::val_less<C>::f<x, y>

emp::val_less_equal<x, y, C = mp::identity> = mp::val_less_equal<C>::f<x, y>

emp::val_greater<x, y, C = mp::identity> = mp::val_greater<C>::f<x, y>

emp::val_greater_equal<x, y, C = mp::identity> = mp::val_greater_equal<C>::f<x, y>

auto emp::val_or_seq_v<L, C = mp::identity> = unpack<L, mp::val_or<C>>::value

auto emp::val_and_seq_v<L, C = mp::identity> = unpack<L, mp::val_and<C>>::value

auto emp::val_left_or_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_or<C>>::value

auto emp::val_left_and_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_and<C>>::value

auto emp::val_add_seq_v<L, C = mp::identity> = unpack<L, mp::val_add<C>>::value

auto emp::val_add0_seq_v<L, C = mp::identity> = unpack<L, mp::val_add0<C>>::value

auto emp::val_left_add_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_add<C>>::value

auto emp::val_left_add0_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_add0<C>>::value

auto emp::val_sub_seq_v<L, C = mp::identity> = unpack<L, mp::val_sub<C>>::value

auto emp::val_sub0_seq_v<L, C = mp::identity> = unpack<L, mp::val_sub0<C>>::value

auto emp::val_lshift_seq_v<L, C = mp::identity> = unpack<L, mp::val_lshift<C>>::value

auto emp::val_lshift0_seq_v<L, C = mp::identity> = unpack<L, mp::val_lshift0<C>>::value

auto emp::val_rshift_seq_v<L, C = mp::identity> = unpack<L, mp::val_rshift<C>>::value

auto emp::val_rshift0_seq_v<L, C = mp::identity> = unpack<L, mp::val_rshift0<C>>::value

auto emp::val_mul_seq_v<L, C = mp::identity> = unpack<L, mp::val_mul<C>>::value

auto emp::val_mul0_seq_v<L, C = mp::identity> = unpack<L, mp::val_mul0<C>>::value

auto emp::val_mul1_seq_v<L, C = mp::identity> = unpack<L, mp::val_mul1<C>>::value

auto emp::val_left_mul_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_mul<C>>::value

auto emp::val_left_mul0_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_mul0<C>>::value

auto emp::val_left_mul1_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_mul1<C>>::value

auto emp::val_div_seq_v<L, C = mp::identity> = unpack<L, mp::val_div<C>>::value

auto emp::val_div0_seq_v<L, C = mp::identity> = unpack<L, mp::val_div0<C>>::value

auto emp::val_div1_seq_v<L, C = mp::identity> = unpack<L, mp::val_div1<C>>::value

auto emp::val_mod_seq_v<L, C = mp::identity> = unpack<L, mp::val_mod<C>>::value

auto emp::val_mod0_seq_v<L, C = mp::identity> = unpack<L, mp::val_mod0<C>>::value

auto emp::val_mod1_seq_v<L, C = mp::identity> = unpack<L, mp::val_mod1<C>>::value

auto emp::val_xor_seq_v<L, C = mp::identity> = unpack<L, mp::val_xor<C>>::value

auto emp::val_xor0_seq_v<L, C = mp::identity> = unpack<L, mp::val_xor0<C>>::value

auto emp::val_left_xor_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_xor<C>>::value

auto emp::val_left_xor0_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_xor0<C>>::value

auto emp::val_bit_and_seq_v<L, C = mp::identity> = unpack<L, mp::val_bit_and<C>>::value

auto emp::val_bit_and0_seq_v<L, C = mp::identity> = unpack<L, mp::val_bit_and0<C>>::value

auto emp::val_left_bit_and_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_bit_and<C>>::value

auto emp::val_left_bit_and0_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_bit_and0<C>>::value

auto emp::val_bit_or_seq_v<L, C = mp::identity> = unpack<L, mp::val_bit_or<C>>::value

auto emp::val_bit_or0_seq_v<L, C = mp::identity> = unpack<L, mp::val_bit_or0<C>>::value

auto emp::val_left_bit_or_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_bit_or<C>>::value

auto emp::val_left_bit_or0_seq_v<L, C = mp::identity> = unpack<L, mp::val_left_bit_or0<C>>::value

auto emp::val_or_c_v<auto... xs> = (xs || ... || false)

auto emp::val_and_c_v<auto... xs> = (xs && ... && true)

auto emp::val_left_or_c_v<auto... xs> = (false || ... || xs)

auto emp::val_left_and_c_v<auto... xs> = (true && ... && xs)

auto emp::val_add_c_v<auto... xs> = (xs + ...)

auto emp::val_add0_c_v<auto... xs> = val_add_c_v<xs..., 0>

auto emp::val_left_add_c_v<auto... xs> = (... + xs)

auto emp::val_left_add0_c_v<auto... xs> = val_left_add_c_v<xs..., 0>

auto emp::val_sub_c_v<auto... xs> = (... - xs)

auto emp::val_sub0_c_v<auto... xs> = val_sub_c_v<xs..., 0>

auto emp::val_lshift_c_v<auto... xs> = (... << xs)

auto emp::val_lshift0_c_v<auto... xs> = val_lshift_c_v<xs..., 0>

auto emp::val_rshift_c_v<auto... xs> = (... >> xs)

auto emp::val_rshift0_c_v<auto... xs> = val_rshift_c_v<xs..., 0>

auto emp::val_mul_c_v<auto... xs> = (xs * ...)

auto emp::val_mul0_c_v<auto... xs> = val_mul_c_v<xs..., (sizeof...(xs) ? 1 : 0)>

auto emp::val_mul1_c_v<auto... xs> = val_mul_c_v<xs..., 1>

auto emp::val_left_mul_c_v<auto... xs> = (... * xs)

auto emp::val_left_mul0_c_v<auto... xs> = val_left_mul_c_v<xs..., (sizeof...(xs) ? 1 : 0)>

auto emp::val_left_mul1_c_v<auto... xs> = val_left_mul_c_v<xs..., 1>

auto emp::val_div_c_v<auto... xs> = (... / xs)

auto emp::val_div0_c_v<auto... xs> = val_div_c_v<xs..., (sizeof...(xs) ? 1 : 0)>

auto emp::val_div1_c_v<auto... xs> = val_div_c_v<xs..., 1>

auto emp::val_mod_c_v<auto... xs> = (... % xs)

auto emp::val_or_v<xs...> = (xs::value || ... || false)

auto emp::val_and_v<xs...> = (xs::value && ... && true)

auto emp::val_left_or_v<xs...> = (false || ... || xs::value)

auto emp::val_left_and_v<xs...> = (true && ... && xs::value)

auto emp::val_add_v<xs...> = (xs::value + ...)

auto emp::val_add0_v<xs...> = mp::val_add0<>::f<xs...>::value

auto emp::val_left_add_v<xs...> = (... + xs::value)

auto emp::val_left_add0_v<xs...> = mp::val_add0<>::f<xs...>::value

auto emp::val_sub_v<xs...> = (... - xs::value)

auto emp::val_sub0_v<xs...> = mp::val_sub0<>::f<xs...>::value

auto emp::val_lshift_v<xs...> = (... << xs::value)

auto emp::val_lshift0_v<xs...> = mp::val_lshift0<>::f<xs...>::value

auto emp::val_rshift_v<xs...> = (... >> xs::value)

auto emp::val_rshift0_v<xs...> = mp::val_rshift0<>::f<xs...>::value

auto emp::val_mul_v<xs...> = (xs::value * ...)

auto emp::val_mul0_v<xs...> = mp::val_mul0<>::f<xs...>::value

auto emp::val_mul1_v<xs...> = mp::val_mul1<>::f<xs...>::value

auto emp::val_left_mul_v<xs...> = (... * xs::value)

auto emp::val_left_mul0_v<xs...> = mp::val_left_mul0<>::f<xs...>::value

auto emp::val_left_mul1_v<xs...> = mp::val_left_mul1<>::f<xs...>::value

auto emp::val_div_v<xs...> = (... / xs::value)

auto emp::val_div0_v<xs...> = mp::val_div0<>::f<xs...>::value

auto emp::val_div1_v<xs...> = mp::val_div1<>::f<xs...>::value

auto emp::val_mod_v<xs...> = (... % xs::value)

auto emp::val_mod0_v<xs...> = mp::val_mod0<>::f<xs...>::value

auto emp::val_mod1_v<xs...> = mp::val_mod1<>::f<xs...>::value

auto emp::val_xor_v<xs...> = (xs::value ^ ...)

auto emp::val_xor0_v<xs...> = mp::val_xor0<>::f<xs...>::value

auto emp::val_left_xor_v<xs...> = (... ^ xs::value)

auto emp::val_left_xor0_v<xs...> = mp::val_left_xor0<>::f<xs...>::value

auto emp::val_bit_and_v<xs...> = (xs::value & ...)

auto emp::val_bit_and0_v<xs...> = mp::val_bit_and0<>::f<xs...>::value

auto emp::val_left_bit_and_v<xs...> = (... & xs::value)

auto emp::val_left_bit_and0_v<xs...> = mp::val_left_bit_and0<>::f<xs...>::value

auto emp::val_bit_or_v<xs...> = (xs::value | ...)

auto emp::val_bit_or0_v<xs...> = mp::val_bit_or0<>::f<xs...>::value

auto emp::val_left_bit_or_v<xs...> = (... | xs::value)

auto emp::val_left_bit_or0_v<xs...> = mp::val_left_bit_or0<>::f<xs...>::value

auto emp::val_neg_v<x, C = mp::identity> = mp::val_neg<C>::f<x>::value

auto emp::val_unary_plus_v<x, C = mp::identity> = mp::val_unary_plus<C>::f<x>::value

auto emp::val_not_v<x, C = mp::identity> = mp::val_not<C>::f<x>::value

auto emp::val_bit_not_v<x, C = mp::identity> = mp::val_bit_not<C>::f<x>::value

auto emp::val_inc_v<x, C = mp::identity> = mp::val_inc<C>::f<x>::value

auto emp::val_dec_v<x, C = mp::identity> = mp::val_dec<C>::f<x>::value

auto emp::val_equal_v<x, y, C = mp::identity> = mp::val_equal<C>::f<x, y>::value

auto emp::val_not_equal_v<x, y, C = mp::identity> = mp::val_not_equal<C>::f<x, y>::value

auto emp::val_less_v<x, y, C = mp::identity> = mp::val_less<C>::f<x, y>::value

auto emp::val_less_equal_v<x, y, C = mp::identity> = mp::val_less_equal<C>::f<x, y>::value

auto emp::val_greater_v<x, y, C = mp::identity> = mp::val_greater<C>::f<x, y>::value

auto emp::val_greater_equal_v<x, y, C = mp::identity> = mp::val_greater_equal<C>::f<x, y>::value

emp::val_mod0_c<auto... xs> = /*...*/

emp::val_mod1_c<auto... xs> = /*...*/

emp::val_xor_c<auto... xs> = val<(xs ^ ...)>

emp::val_xor0_c<auto... xs> = val_xor_c<xs..., 0, 0>

emp::val_left_xor_c<auto... xs> = val<(... ^ xs)>

emp::val_left_xor0_c<auto... xs> = val_left_xor_c<xs..., 0, 0>

emp::val_bit_and_c<auto... xs> = val<(xs & ...)>

emp::val_bit_and0_c<auto... xs> = /*...*/

emp::val_left_bit_and_c<auto... xs> = val<(... & xs)>

emp::val_left_bit_and0_c<auto... xs> = /*...*/

emp::val_bit_or_c<auto... xs> = val<(xs | ...)>

emp::val_bit_or0_c<auto... xs> = /*...*/

emp::val_left_bit_or_c<auto... xs> = val<(... | xs)>

emp::val_left_bit_or0_c<auto... xs> = /*...*/

auto emp::val_mod0_c_v<auto... xs> = /*...*/

auto emp::val_mod1_c_v<auto... xs> = /*...*/

auto emp::val_xor_c_v<auto... xs> = val<(xs ^ ...)>()

auto emp::val_xor0_c_v<auto... xs> = val_xor_c_v<xs..., 0, 0>()

auto emp::val_left_xor_c_v<auto... xs> = val<(... ^ xs)>()

auto emp::val_left_xor0_c_v<auto... xs> = val_left_xor_c_v<xs..., 0, 0>()

auto emp::val_bit_and_c_v<auto... xs> = val<(xs & ...)>()

auto emp::val_bit_and0_c_v<auto... xs> = /*...*/

auto emp::val_left_bit_and_c_v<auto... xs> = val<(... & xs)>()

auto emp::val_left_bit_and0_c_v<auto... xs> = /*...*/

auto emp::val_bit_or_c_v<auto... xs> = val<(xs | ...)>()

auto emp::val_bit_or0_c_v<auto... xs> = /*...*/

auto emp::val_left_bit_or_c_v<auto... xs> = val<(... | xs)>()

auto emp::val_left_bit_or0_c_v<auto... xs> = /*...*/

<jln/mp/value/values.hpp>

values<C = listify>::f<xs...>

Implementation

C::f<val<xs::value>...>

typed_values<C = listify>::f<T, xs...>

Implementation

C::f<val<T(xs::value)>...>

emp::values<auto... xs> = list<val<xs>...>

emp::typed_values<T, T... xs> = list<val<T(xs)>...>