|  | 
| constexpr auto | always | 
|  | Return a constant function returning xregardless of the argument(s) it is invoked with.  More...
 | 
|  | 
| constexpr auto | apply | 
|  | Invokes a Callable with the given arguments.  More... 
 | 
|  | 
| template<std::size_t n> | 
| constexpr auto | arg | 
|  | Return the nth passed argument.  More...
 | 
|  | 
| constexpr auto | capture | 
|  | Create a function capturing the given variables.  More... 
 | 
|  | 
| constexpr auto | compose | 
|  | Return the composition of two functions or more.  More... 
 | 
|  | 
| template<std::size_t n> | 
| constexpr auto | curry | 
|  | Curry a function up to the given number of arguments.  More... 
 | 
|  | 
| constexpr auto | demux | 
|  | Invoke a function with the results of invoking other functions on its arguments.  More... 
 | 
|  | 
| constexpr auto | fix | 
|  | Return a function computing the fixed point of a function.  More... 
 | 
|  | 
| constexpr auto | flip | 
|  | Invoke a function with its two first arguments reversed.  More... 
 | 
|  | 
| constexpr auto | id | 
|  | The identity function – returns its argument unchanged.  More... 
 | 
|  | 
| constexpr auto | infix | 
|  | Return an equivalent function that can also be applied in infix notation.  More... 
 | 
|  | 
| template<std::size_t n> | 
| constexpr auto | iterate | 
|  | Applies another function ntimes to its argument.  More...
 | 
|  | 
| constexpr auto | lockstep | 
|  | Invoke a function with the result of invoking other functions on its arguments, in lockstep.  More... 
 | 
|  | 
| constexpr auto | on | 
|  | Invoke a function with the result of invoking another function on each argument.  More... 
 | 
|  | 
| constexpr auto | overload | 
|  | Pick one of several functions to call based on overload resolution.  More... 
 | 
|  | 
| constexpr auto | overload_linearly | 
|  | Call the first function that produces a valid call expression.  More... 
 | 
|  | 
| constexpr auto | partial | 
|  | Partially apply a function to some arguments.  More... 
 | 
|  | 
| constexpr unspecified | _ {} | 
|  | Create simple functions representing C++ operators inline.  More... 
 | 
|  | 
| constexpr auto | reverse_partial | 
|  | Partially apply a function to some arguments.  More... 
 | 
|  | 
| template<typename S > | 
| constexpr auto | accessors | 
|  | Returns a Sequenceof pairs representing the accessors of the data structure.Given aStructS,accessors<S>()is aSequenceofProducts where the first element of each pair is the "name" of a member of theStruct, and the second element of each pair is a function that can be used to access that member when given an object of the proper data type. As described in the global documentation forStruct, the accessor functions in this sequence must be move-independent.  More...
 | 
|  | 
| constexpr auto | adjust | 
|  | Apply a function on all the elements of a structure that compare equal to some value.  More... 
 | 
|  | 
| constexpr auto | adjust_if | 
|  | Apply a function on all the elements of a structure satisfying a predicate.Given a Functor, a predicate predand a functionf,adjust_ifwill adjust the elements of the Functor that satisfy the predicate with the functionf. In other words,adjust_ifwill return a new Functor equal to the original one, except that the elements satisfying the predicate will be transformed with the given function. Elements for which the predicate is not satisfied are left untouched, and they are kept as-is in the resulting Functor.  More...
 | 
|  | 
| constexpr auto | all | 
|  | Returns whether all the keys of the structure are true-valued.The keys of the structure must be Logicals. If the structure is not finite, a false-valued key must appear at a finite "index" in order for this method to finish.  More...
 | 
|  | 
| constexpr auto | all_of | 
|  | Returns whether all the keys of the structure satisfy the predicate.If the structure is not finite,predicatehas to return a false- valuedLogicalafter looking at a finite number of keys for this method to finish.  More...
 | 
|  | 
| constexpr auto | and_ | 
|  | Return whether all the arguments are true-valued. and_can be called with one argument or more. When called with two arguments,and_uses tag-dispatching to find the right implementation. Otherwise,.  More...
 | 
|  | 
| constexpr auto | any | 
|  | Returns whether any key of the structure is true-valued.The keys of the structure must be Logicals. If the structure is not finite, a true-valued key must appear at a finite "index" in order for this method to finish.  More...
 | 
|  | 
| constexpr auto | any_of | 
|  | Returns whether any key of the structure satisfies the predicate.If the structure is not finite,predicatehas to be satisfied after looking at a finite number of keys for this method to finish.  More...
 | 
|  | 
| constexpr auto | ap | 
|  | Lifted application.Specifically, apapplies a structure containing functions to a structure containing values, and returns a new structure containing values. The exact way in which the functions are applied to the values depends on theApplicative.  More...
 | 
|  | 
| constexpr auto | append | 
|  | Append an element to a monadic structure.Given an element xand a monadic structurexs,appendreturns a new monadic structure which is the result of liftingxinto the monadic structure and then combining that (to the right) withxs. In other words,.  More...
 | 
|  | 
| constexpr auto | at | 
|  | Returns the nth element of an iterable.Given anIterableand anIntegralConstantindex,atreturns the element located at the index in the linearization of the iterable. Specifically, given an iterablexswith a linearization of[x1, ..., xN],at(xs, k)is equivalent toxk.  More...
 | 
|  | 
| template<std::size_t n> | 
| constexpr auto | at_c | 
|  | Equivalent to at; provided for convenience.  More...
 | 
|  | 
| constexpr auto | at_key | 
|  | Returns the value associated to the given key in a structure, or fail.Given a keyand aSearchablestructure,at_keyreturns the first value whose key is equal to the givenkey, and fails at compile-time if no such key exists. This requires thekeyto be compile-timeComparable, exactly like forfind.at_keysatisfies the following:  More...
 | 
|  | 
| constexpr auto | back | 
|  | Returns the last element of a non-empty and finite iterable.Given a non-empty and finite iterable xswith a linearization of[x1, ..., xN],back(xs)is equal toxN. Equivalently,back(xs)must be equivalent toat_c<N-1>(xs), and that regardless of the value category ofxs(backmust respect the reference semantics ofat).  More...
 | 
|  | 
| constexpr auto | cartesian_product | 
|  | Computes the cartesian product of a sequence of sequences.Given a sequence of sequences, cartesian_productreturns a new sequence of sequences containing the cartesian product of the original sequences. For this method to finish, a finite number of finite sequences must be provided.  More...
 | 
|  | 
| constexpr auto | chain | 
|  | Feed a monadic value into a monadic computation.Given a monadic value and a monadic function, chainfeeds the monadic value into the function, thus performing some Monad-specific effects, and returns the result. An implementation ofchainmust satisfy.  More...
 | 
|  | 
| constexpr auto | comparing | 
|  | Returns a function performing equalafter applying a transformation to both arguments.comparingcreates an equivalence relation based on the result of applying a function to some objects, which is especially useful in conjunction with algorithms that accept a custom predicate that must represent an equivalence relation.  More...
 | 
|  | 
| constexpr auto | concat | 
|  | Combine two monadic structures together.Given two monadic structures, concatcombines them together and returns a new monadic structure. The exact definition ofconcatwill depend on the exact model of MonadPlus at hand, but for sequences it corresponds intuitively to simple concatenation.  More...
 | 
|  | 
| constexpr auto | contains | 
|  | Returns whether the key occurs in the structure.Given a Searchablestructurexsand akey,containsreturns whether any of the keys of the structure is equal to the givenkey. If the structure is not finite, an equal key has to appear at a finite position in the structure for this method to finish. For convenience,containscan also be applied in infix notation.  More...
 | 
|  | 
| constexpr auto | in = hana::infix(hana::flip(hana::contains)) | 
|  | Return whether the key occurs in the structure.Specifically, this is equivalent to contains, exceptintakes its arguments in reverse order. Likecontains,incan also be applied in infix notation for increased expressiveness. This function is not a method that can be overriden; it is just a convenience function provided with the concept.  More...
 | 
|  | 
| template<typename Tag , typename optional_T > | 
| constexpr auto | is_a = see-documentation | 
|  | Returns whether the tag of an object matches a given tag.  More... 
 | 
|  | 
| template<typename Tag , typename ... T> | 
| constexpr auto | is_an = is_a<Tag, T...> | 
|  | Equivalent to is_a; provided for consistency with the rules of the English language.
 | 
|  | 
| template<typename Tag > | 
| constexpr auto | make | 
|  | Create an object of the given tag with the given arguments.  More... 
 | 
|  | 
| template<typename To > | 
| constexpr auto | to | 
|  | Converts an object from one data type to another.  More... 
 | 
|  | 
| constexpr auto | count | 
|  | Return the number of elements in the structure that compare equal to a given value.Given a Foldable structure xsand a valuevalue,countreturns an unsigned integral, or a Constant thereof, representing the number of elements ofxsthat compare equal tovalue. For this method to be well-defined, all the elements of the structure must be Comparable with the given value.  More...
 | 
|  | 
| constexpr auto | count_if | 
|  | Return the number of elements in the structure for which the predicateis satisfied.Specifically, returns an object of an unsigned integral type, or aConstantholding such an object, which represents the number of elements in the structure satisfying the givenpredicate.  More...
 | 
|  | 
| constexpr auto | cycle | 
|  | Combine a monadic structure with itself ntimes.Given a monadic structurexsand a non-negative numbern,cyclereturns a new monadic structure which is the result of combiningxswith itselfntimes using theconcatoperation. In other words,.  More...
 | 
|  | 
| constexpr auto | div | 
|  | Generalized integer division.  More... 
 | 
|  | 
| constexpr auto | drop_back | 
|  | Drop the last nelements of a finite sequence, and return the rest.Given a finiteSequencexswith a linearization of[x1, ..., xm]and a non-negativeIntegralConstantn,drop_back(xs, n)is a sequence with the same tag asxswhose linearization is[x1, ..., xm-n]. Ifnis not given, it defaults to anIntegralConstantwith a value equal to1.  More...
 | 
|  | 
| constexpr auto | drop_front | 
|  | Drop the first nelements of an iterable, and return the rest.Given anIterablexswith a linearization of[x1, x2, ...]and a non-negativeIntegralConstantn,drop_front(xs, n)is an iterable with the same tag asxswhose linearization is[xn+1, xn+2, ...]. In particular, note that this function does not mutate the original iterable in any way. Ifnis not given, it defaults to anIntegralConstantwith a value equal to1.  More...
 | 
|  | 
| constexpr auto | drop_front_exactly | 
|  | Drop the first nelements of an iterable, and return the rest.Given anIterablexswith a linearization of[x1, x2, ...]and a non-negativeIntegralConstantn,drop_front_exactly(xs, n)is an iterable with the same tag asxswhose linearization is[xn+1, xn+2, ...]. In particular, note that this function does not mutate the original iterable in any way. Ifnis not given, it defaults to anIntegralConstantwith a value equal to1.  More...
 | 
|  | 
| constexpr auto | drop_while | 
|  | Drop elements from an iterable up to, but excluding, the first element for which the predicateis not satisfied.Specifically,drop_whilereturns an iterable containing all the elements of the original iterable except for those in the range delimited by [head,e), whereheadis the first element andeis the first element for which thepredicateis not satisfied. If the iterable is not finite, thepredicatehas to return a false- valuedLogicalat a finite index for this method to return.  More...
 | 
|  | 
| constexpr auto | duplicate | 
|  | Add an extra layer of comonadic context to a comonadic value.Given a value already in a comonadic context, duplicatewraps this value with an additional layer of comonadic context. This can be seen as the dual operation toflattenfrom the Monad concept.  More...
 | 
|  | 
| template<typename M > | 
| constexpr auto | empty | 
|  | Identity of the monadic combination concat.  More...
 | 
|  | 
| constexpr auto | equal | 
|  | Returns a Logicalrepresenting whetherxis equal toy.Theequalfunction can be called in two different ways. First, it can be called like a normal function:  More...
 | 
|  | 
| constexpr auto | eval_if | 
|  | Conditionally execute one of two branches based on a condition.Given a condition and two branches in the form of lambdas or hana::lazys,eval_ifwill evaluate the branch selected by the condition withevaland return the result. The exact requirements for what the branches may be are the same requirements as those for theevalfunction.  More...
 | 
|  | 
| constexpr auto | extend | 
|  | Comonadic application of a function to a comonadic value.Given a comonadic value and a function accepting a comonadic input, extendreturns the result of applying the function to that input inside the comonadic context.  More...
 | 
|  | 
| constexpr auto | extract | 
|  | Extract a value in a given comonadic context.Given a value inside a comonadic context, extract it from that context, performing whatever effects are mandated by that context. This can be seen as the dual operation to the liftmethod of the Applicative concept.  More...
 | 
|  | 
| constexpr auto | fill | 
|  | Replace all the elements of a structure with a fixed value.  More... 
 | 
|  | 
| constexpr auto | filter | 
|  | Filter a monadic structure using a custom predicate.Given a monadic structure and a predicate, filterreturns a new monadic structure containing only those elements that satisfy the predicate. This is a generalization of the usualfilterfunction for sequences; it works for any MonadPlus. Intuitively,filteris somewhat equivalent to:  More...
 | 
|  | 
| constexpr auto | find | 
|  | Finds the value associated to the given key in a structure.Given a keyand aSearchablestructure,findreturns thejustthe first value whose key is equal to the givenkey, ornothingif there is no such key. Comparison is done withequal.findsatisfies the following:  More...
 | 
|  | 
| constexpr auto | find_if | 
|  | Finds the value associated to the first key satisfying a predicate.Given a Searchablestructurexsand a predicatepred,find_if(xs, pred)returnsjustthe first element whose key satisfies the predicate, ornothingif there is no such element.  More...
 | 
|  | 
| constexpr auto | first | 
|  | Returns the first element of a pair.Note that if the Productactually stores the elements it contains,hana::firstis required to return a lvalue reference, a lvalue reference to const or a rvalue reference to the first element, where the type of reference must match that of the pair passed tofirst. If theProductdoes not store the elements it contains (i.e. it generates them on demand), this requirement is dropped.  More...
 | 
|  | 
| constexpr auto | flatten | 
|  | Collapse two levels of monadic structure into a single level.Given a monadic value wrapped into two levels of monad, flattenremoves one such level. An implementation offlattenmust satisfy.  More...
 | 
|  | 
| constexpr auto | fold = fold_left | 
|  | Equivalent to fold_left; provided for convenience.foldis equivalent tofold_left. However, it is not tag-dispatched on its own because it is just an alias tofold_left. Also note thatfoldcan be called with or without an initial state, just likefold_left:  More...
 | 
|  | 
| constexpr auto | fold_left | 
|  | Left-fold of a structure using a binary operation and an optional initial reduction state. fold_leftis a left-associative fold using a binary operation. Given a structure containingx1, ..., xn, a functionfand an optional initial state,fold_leftappliesfas follows.  More...
 | 
|  | 
| constexpr auto | fold_right | 
|  | Right-fold of a structure using a binary operation and an optional initial reduction state. fold_rightis a right-associative fold using a binary operation. Given a structure containingx1, ..., xn, a functionfand an optional initial state,fold_rightappliesfas follows.  More...
 | 
|  | 
| constexpr auto | for_each | 
|  | Perform an action on each element of a foldable, discarding the result each time.Iteration is done from left to right, i.e. in the same order as when using fold_left. If the structure is not finite, this method will not terminate.  More...
 | 
|  | 
| constexpr auto | front | 
|  | Returns the first element of a non-empty iterable.Given a non-empty Iterable xswith a linearization of[x1, ..., xN],front(xs)is equal tox1. Ifxsis empty, it is an error to use this function. Equivalently,front(xs)must be equivalent toat_c<0>(xs), and that regardless of the value category ofxs(frontmust respect the reference semantics ofat).  More...
 | 
|  | 
| constexpr auto | fuse | 
|  | Transform a function taking multiple arguments into a function that can be called with a compile-time Foldable.  More...
 | 
|  | 
| constexpr auto | greater | 
|  | Returns a Logicalrepresenting whetherxis greater thany.  More...
 | 
|  | 
| constexpr auto | greater_equal | 
|  | Returns a Logicalrepresenting whetherxis greater than or equal toy.  More...
 | 
|  | 
| constexpr auto | group | 
|  | Group adjacent elements of a sequence that all respect a binary predicate, by default equality.Given a finite Sequence and an optional predicate (by default equal),groupreturns a sequence of subsequences representing groups of adjacent elements that are "equal" with respect to the predicate. In other words, the groups are such that the predicate is satisfied when it is applied to any two adjacent elements in that group. The sequence returned bygroupis such that the concatenation of its elements is equal to the original sequence, which is equivalent to saying that the order of the elements is not changed.  More...
 | 
|  | 
| constexpr auto | hash | 
|  | Returns a hana::typerepresenting the compile-time hash of an object.Given an arbitrary objectx,hana::hashreturns ahana::typerepresenting the hash ofx. In normal programming, hashes are usually numerical values that can be used e.g. as indices in an array as part of the implementation of a hash table. In the context of metaprogramming, we are interested in type-level hashes instead. Thus,hana::hashmust return ahana::typeobject instead of an integer. Thishana::typemust somehow summarize the object being hashed, but that summary may of course lose some information.  More...
 | 
|  | 
| constexpr auto | if_ | 
|  | Conditionally return one of two values based on a condition.Specifically, thenis returned iffcondis true-valued, andelse_is returned otherwise. Note that someLogicalmodels may allowthenandelse_to have different types, while others may require both values to have the same type.  More...
 | 
|  | 
| constexpr auto | index_if | 
|  | Finds the value associated to the first key satisfying a predicate.Given an Iterablestructurexsand a predicatepred,index_if(xs, pred)returns ahana::optionalcontaining anIntegralConstantof the index of the first element that satisfies the predicate or nothing if no element satisfies the predicate.  More...
 | 
|  | 
| constexpr insert_t | insert {} | 
|  | Insert a value at a given index in a sequence.Given a sequence, an index and an element to insert, insertinserts the element at the given index.  More...
 | 
|  | 
| constexpr auto | insert_range | 
|  | Insert several values at a given index in a sequence.Given a sequence, an index and any Foldablecontaining elements to insert,insert_rangeinserts the elements in theFoldableat the given index of the sequence.  More...
 | 
|  | 
| constexpr auto | intersperse | 
|  | Insert a value between each pair of elements in a finite sequence.Given a finite Sequencexswith a linearization of[x1, x2, ..., xn],intersperse(xs, z)is a new sequence with a linearization of[x1, z, x2, z, x3, ..., xn-1, z, xn]. In other words, it inserts thezelement between every pair of elements of the original sequence. If the sequence is empty or has a single element,interspersereturns the sequence as-is. In all cases, the sequence must be finite.  More...
 | 
|  | 
| constexpr auto | is_disjoint | 
|  | Returns whether two Searchables are disjoint.Given twoSearchablesxsandys,is_disjointreturns aLogicalrepresenting whether the keys inxsare disjoint from the keys inys, i.e. whether both structures have no keys in common.  More...
 | 
|  | 
| constexpr auto | is_empty | 
|  | Returns whether the iterable is empty.Given an Iterablexs,is_emptyreturns whetherxscontains no more elements. In other words, it returns whether trying to extract the tail ofxswould be an error. In the current version of the library,is_emptymust return anIntegralConstantholding a value convertible tobool. This is because only compile-timeIterables are supported right now.  More...
 | 
|  | 
| constexpr auto | is_subset | 
|  | Returns whether a structure contains a subset of the keys of another structure.Given two Searchablesxsandys,is_subsetreturns aLogicalrepresenting whetherxsis a subset ofys. In other words, it returns whether all the keys ofxsare also present inys. This method does not return whetherxsis a strict subset ofys; ifxsandysare equal, all the keys ofxsare also present inys, andis_subsetreturns true.  More...
 | 
|  | 
| constexpr keys_t | keys {} | 
|  | Returns a Sequencecontaining the name of the members of the data structure.Given aStructobject,keysreturns aSequencecontaining the name of all the members of theStruct, in the same order as they appear in theaccessorssequence.  More...
 | 
|  | 
| constexpr auto | length | 
|  | Return the number of elements in a foldable structure.Given a Foldablexs,length(xs)must return an object of an unsigned integral type, or anIntegralConstantholding such an object, which represents the number of elements in the structure.  More...
 | 
|  | 
| constexpr auto | less | 
|  | Returns a Logicalrepresenting whetherxis less thany.  More...
 | 
|  | 
| constexpr auto | less_equal | 
|  | Returns a Logicalrepresenting whetherxis less than or equal toy.  More...
 | 
|  | 
| constexpr auto | lexicographical_compare | 
|  | Short-circuiting lexicographical comparison of two Iterables with an optional custom predicate, by defaulthana::less.Given twoIterablesxsandysand a binary predicatepred,lexicographical_comparereturns whetherxsis to be considered less thanysin a lexicographical ordering. Specifically, let's denote the linearizations ofxsandysby[x1, x2, ...]and[y1, y2, ...], respectively. If the first couple satisfying the predicate is of the formxi, yi,lexicographical_comparereturns true. Otherwise, if the first couple to satisfy the predicate is of the formyi, xi,lexicographical_comparereturns false. If no such couple can be found,lexicographical_comparereturns whetherxshas fewer elements thanys.  More...
 | 
|  | 
| template<typename A > | 
| constexpr auto | lift | 
|  | Lift a value into an Applicativestructure.lift<A>takes a normal value and embeds it into a structure whose shape is represented by theAApplicative. Note that the value may be a function, in which case the created structure may beapplied to anotherApplicativestructure containing values.  More...
 | 
|  | 
| constexpr auto | max | 
|  | Returns the greatest of its arguments according to the lessordering.  More...
 | 
|  | 
| constexpr auto | maximum | 
|  | Return the greatest element of a non-empty structure with respect to a predicate, by defaultless.Given a non-empty structure and an optional binary predicate (lessby default),maximumreturns the greatest element of the structure, i.e. an element which is greater than or equal to every other element in the structure, according to the predicate.  More...
 | 
|  | 
| constexpr auto | members | 
|  | Returns a Sequencecontaining the members of aStruct.Given aStructobject,membersreturns aSequencecontaining all the members of theStruct, in the same order as their respective accessor appears in theaccessorssequence.  More...
 | 
|  | 
| constexpr auto | min | 
|  | Returns the smallest of its arguments according to the lessordering.  More...
 | 
|  | 
| constexpr auto | minimum | 
|  | Return the least element of a non-empty structure with respect to a predicate, by defaultless.Given a non-empty structure and an optional binary predicate (lessby default),minimumreturns the least element of the structure, i.e. an element which is less than or equal to every other element in the structure, according to the predicate.  More...
 | 
|  | 
| constexpr auto | minus | 
|  | Subtract two elements of a group.Specifically, this performs the Monoidoperation on the first argument and on the inverse of the second argument, thus being equivalent to:  More...
 | 
|  | 
| constexpr auto | mod | 
|  | Generalized integer modulus.Given two elements of an EuclideanRing xandy, withynonzero,modreturns the modulus of the division ofxbyy. In other words,modcan be seen as an equivalent to%.  More...
 | 
|  | 
| constexpr auto | monadic_compose | 
|  | Composition of monadic functions.Given two monadic functions fandg,monadic_composereturns a new function equivalent to the composition offwithg, except the result ofgischained intofinstead of simply passed to it, as with normal composition.monadic_composesatisfies.  More...
 | 
|  | 
| template<typename M > | 
| constexpr auto | monadic_fold_left | 
|  | Monadic left-fold of a structure with a binary operation and an optional initial reduction state.  More... 
 | 
|  | 
| template<typename M > | 
| constexpr auto | monadic_fold_right | 
|  | Monadic right-fold of a structure with a binary operation and an optional initial reduction state.  More... 
 | 
|  | 
| constexpr auto | mult | 
|  | Associative operation of a Ring.  More...
 | 
|  | 
| constexpr auto | negate | 
|  | Return the inverse of an element of a group.  More... 
 | 
|  | 
| constexpr auto | none | 
|  | Returns whether all of the keys of the structure are false-valued.The keys of the structure must be Logicals. If the structure is not finite, a true-valued key must appear at a finite "index" in order for this method to finish.  More...
 | 
|  | 
| constexpr auto | none_of | 
|  | Returns whether none of the keys of the structure satisfy the predicate.If the structure is not finite,predicatehas to return a true- valuedLogicalafter looking at a finite number of keys for this method to finish.  More...
 | 
|  | 
| constexpr auto | not_ | 
|  | Negates a Logical.This method returns aLogicalwith the same tag, but whose truth-value is negated. Specifically,not_(x)returns a false-valuedLogicalifxis a true-valuedLogical, and a true-valued one otherwise.  More...
 | 
|  | 
| constexpr auto | not_equal | 
|  | Returns a Logicalrepresenting whetherxis not equal toy.Thenot_equalfunction can be called in two different ways. First, it can be called like a normal function:  More...
 | 
|  | 
| template<typename R > | 
| constexpr auto | one | 
|  | Identity of the Ringmultiplication.  More...
 | 
|  | 
| constexpr auto | or_ | 
|  | Return whether any of the arguments is true-valued. or_can be called with one argument or more. When called with two arguments,or_uses tag-dispatching to find the right implementation. Otherwise,.  More...
 | 
|  | 
| constexpr auto | ordering | 
|  | Returns a function performing lessafter applying a transformation to both arguments.orderingcreates a total order based on the result of applying a function to some objects, which is especially useful in conjunction with algorithms that accept a custom predicate that must represent a total order.  More...
 | 
|  | 
| constexpr auto | partition | 
|  | Partition a sequence based on a predicate.Specifically, returns an unspecifiedProductwhose first element is a sequence of the elements satisfying the predicate, and whose second element is a sequence of the elements that do not satisfy the predicate.  More...
 | 
|  | 
| constexpr auto | permutations | 
|  | Return a sequence of all the permutations of the given sequence.Specifically, permutations(xs)is a sequence whose elements are permutations of the original sequencexs. The permutations are not guaranteed to be in any specific order. Also note that the number of permutations grows very rapidly as the length of the original sequence increases. The growth rate isO(length(xs)!); with a sequencexsof length only 8,permutations(xs)contains over 40 000 elements!  More...
 | 
|  | 
| constexpr auto | plus | 
|  | Associative binary operation on a Monoid.  More...
 | 
|  | 
| constexpr auto | power | 
|  | Elevate a ring element to its nth power.Specifically,power(x, n), is equivalent to multiplyingxwith itselfntimes using the Ring's multiplication. If the power is equal tozero, the Ring's identity (one) is returned.  More...
 | 
|  | 
| constexpr auto | prefix | 
|  | Inserts a value before each element of a monadic structure.Given a monadic structure xsand a valuezcalled the prefix,prefixreturns a new monadic structure.prefixsatisfies.  More...
 | 
|  | 
| constexpr auto | prepend | 
|  | Prepend an element to a monadic structure.Given a monadic structure xsand an elementx,prependreturns a new monadic structure which is the result of liftingxinto the monadic structure and then combining that (to the left) withxs. In other words,.  More...
 | 
|  | 
| constexpr auto | product = see documentation | 
|  | Compute the product of the numbers of a structure.More generally, productwill take any foldable structure containing objects forming a Ring and reduce them using the Ring's binary operation. The initial state for folding is the identity of the Ring's operation. It is sometimes necessary to specify the Ring to use; this is possible by usingproduct<R>. If no Ring is specified, the structure will use the Ring formed by the elements it contains (if it knows it), orintegral_constant_tag<int>otherwise. Hence,.  More...
 | 
|  | 
| constexpr auto | remove | 
|  | Remove all the elements of a monadic structure that are equal to some value.Given a monadic structure xsand avalue,removereturns a new monadic structure equal toxswithout all its elements that are equal to the givenvalue.removeis equivalent toremove_ifwith theequal.to(value)predicate, i.e.  More...
 | 
|  | 
| constexpr auto | remove_at | 
|  | Remove the element at a given index from a sequence. remove_atreturns a new sequence identical to the original, except that the element at the given index is removed. Specifically,remove_at([x0, ..., xn-1, xn, xn+1, ..., xm], n)is a new sequence equivalent to[x0, ..., xn-1, xn+1, ..., xm].  More...
 | 
|  | 
| template<std::size_t n> | 
| constexpr auto | remove_at_c | 
|  | Equivalent to remove_at; provided for convenience.  More...
 | 
|  | 
| constexpr auto | remove_if | 
|  | Remove all the elements of a monadic structure that satisfy some predicate.Given a monadic structure xsand a unary predicate,remove_ifreturns a new monadic structure equal toxswithout all its elements that satisfy the predicate. This is equivalent tofilterwith a negated predicate, i.e.  More...
 | 
|  | 
| constexpr auto | remove_range | 
|  | Remove the elements inside a given range of indices from a sequence. remove_rangereturns a new sequence identical to the original, except that elements at indices in the provided range are removed. Specifically,remove_range([x0, ..., xn], from, to)is a new sequence equivalent to[x0, ..., x_from-1, x_to, ..., xn].  More...
 | 
|  | 
| template<std::size_t from, std::size_t to> | 
| constexpr auto | remove_range_c | 
|  | Equivalent to remove_range; provided for convenience.  More...
 | 
|  | 
| constexpr auto | repeat | 
|  | Invokes a nullary function ntimes.Given anIntegralConstantnand a nullary functionf,repeat(n, f)will callfntimes. In particular, any decent compiler should expandrepeat(n, f)to.  More...
 | 
|  | 
| constexpr auto | replace | 
|  | Replace all the elements of a structure that compare equal to some valuewith some new fixed value.  More...
 | 
|  | 
| constexpr auto | replace_if | 
|  | Replace all the elements of a structure satisfying a predicatewith a fixed value.  More...
 | 
|  | 
| template<typename M > | 
| constexpr auto | replicate | 
|  | Create a monadic structure by combining a lifted value with itself ntimes.Given a valuex, a non-negativeIntegralConstantnand the tag of a monadic structureM,replicatecreates a new monadic structure which is the result of combiningxwith itselfntimes inside the monadic structure. In other words,replicatesimplyliftsxinto the monadic structure, and then combines that with itselfntimes:  More...
 | 
|  | 
| constexpr auto | reverse | 
|  | Reverse a sequence.Specifically, reverse(xs)is a new sequence containing the same elements asxs, except in reverse order.  More...
 | 
|  | 
| constexpr auto | reverse_fold | 
|  | Equivalent to reverse_foldin Boost.Fusion and Boost.MPL.This method has the same semantics asreverse_foldin Boost.Fusion and Boost.MPL, with the extension that an initial state is not required. This method is equivalent tofold_right, except that the accumulating function must take its arguments in reverse order, to match the order used in Fusion. In other words,.  More...
 | 
|  | 
| constexpr auto | scan_left | 
|  | Fold a Sequence to the left and return a list containing the successive reduction states.Like fold_left,scan_leftreduces a sequence to a single value using a binary operation. However, unlikefold_left, it builds up a sequence of the intermediary results computed along the way and returns that instead of only the final reduction state. Likefold_left,scan_leftcan be used with or without an initial reduction state.  More...
 | 
|  | 
| constexpr auto | scan_right | 
|  | Fold a Sequence to the right and return a list containing the successive reduction states.Like fold_right,scan_rightreduces a sequence to a single value using a binary operation. However, unlikefold_right, it builds up a sequence of the intermediary results computed along the way and returns that instead of only the final reduction state. Likefold_right,scan_rightcan be used with or without an initial reduction state.  More...
 | 
|  | 
| constexpr auto | second | 
|  | Returns the second element of a pair.Note that if the Productactually stores the elements it contains,hana::secondis required to return a lvalue reference, a lvalue reference to const or a rvalue reference to the second element, where the type of reference must match that of the pair passed tosecond. If theProductdoes not store the elements it contains (i.e. it generates them on demand), this requirement is dropped.  More...
 | 
|  | 
| constexpr auto | size = hana::length | 
|  | Equivalent to length; provided for consistency with the standard library.This method is an alias tolengthprovided for convenience and consistency with the standard library. As an alias,sizeis not tag-dispatched on its own andlengthshould be customized instead.  More...
 | 
|  | 
| constexpr auto | slice | 
|  | Extract the elements of a Sequenceat the given indices.Given an arbitrary sequence ofindices,slicereturns a new sequence of the elements of the original sequence that appear at those indices. In other words,.  More...
 | 
|  | 
| template<std::size_t from, std::size_t to> | 
| constexpr auto | slice_c | 
|  | Shorthand to slicea contiguous range of elements.slice_cis simply a shorthand to slice a contiguous range of elements. In particular,slice_c<from, to>(xs)is equivalent toslice(xs, range_c<std::size_t, from, to>), which simply slices all the elements ofxscontained in the half-open interval delimited by[from, to). Like forslice, the indices used withslice_care 0-based and they must be in the bounds of the sequence being sliced.  More...
 | 
|  | 
| constexpr auto | sort | 
|  | Sort a sequence, optionally based on a custom predicate.Given a Sequence and an optional predicate (by defaultless),sortreturns a new sequence containing the same elements as the original, except they are ordered in such a way that ifxcomes beforeyin the sequence, then eitherpredicate(x, y)is true, or bothpredicate(x, y)andpredicate(y, x)are false.  More...
 | 
|  | 
| constexpr auto | span | 
|  | Returns a Productcontaining the longest prefix of a sequence satisfying a predicate, and the rest of the sequence.The first component of the returnedProductis a sequence for which all elements satisfy the given predicate. The second component of the returnedProductis a sequence containing the remainder of the argument. Both or either sequences may be empty, depending on the input argument. More specifically,.  More...
 | 
|  | 
| constexpr auto | suffix | 
|  | Inserts a value after each element of a monadic structure.Given a monadic structure xsand a valuez(called the suffix),suffixreturns a new monadic structure such that.  More...
 | 
|  | 
| constexpr auto | sum = see documentation | 
|  | Compute the sum of the numbers of a structure.More generally, sumwill take any foldable structure containing objects forming a Monoid and reduce them using the Monoid's binary operation. The initial state for folding is the identity of the Monoid. It is sometimes necessary to specify the Monoid to use; this is possible by usingsum<M>. If no Monoid is specified, the structure will use the Monoid formed by the elements it contains (if it knows it), orintegral_constant_tag<int>otherwise. Hence,.  More...
 | 
|  | 
| constexpr auto | take_back | 
|  | Returns the last nelements of a sequence, or the whole sequence if the sequence has less thannelements.Given aSequencexsand anIntegralConstantn,take_back(xs, n)is a new sequence containing the lastnelements ofxs, in the same order. Iflength(xs) <= n, the whole sequence is returned and no error is triggered.  More...
 | 
|  | 
| template<std::size_t n> | 
| constexpr auto | take_back_c | 
|  | Equivalent to take_back; provided for convenience.  More...
 | 
|  | 
| constexpr auto | take_front | 
|  | Returns the first nelements of a sequence, or the whole sequence if the sequence has less thannelements.Given aSequencexsand anIntegralConstantn,take_front(xs, n)is a new sequence containing the firstnelements ofxs, in the same order. Iflength(xs) <= n, the whole sequence is returned and no error is triggered.  More...
 | 
|  | 
| template<std::size_t n> | 
| constexpr auto | take_front_c | 
|  | Equivalent to take_front; provided for convenience.  More...
 | 
|  | 
| constexpr auto | take_while | 
|  | Take elements from a sequence while the predicateis satisfied.Specifically,take_whilereturns a new sequence containing the longest prefix ofxsin which all the elements satisfy the given predicate.  More...
 | 
|  | 
| template<typename M > | 
| constexpr auto | tap | 
|  | Tap inside a monadic chain.Given a function f,tap<M>returns a new function which performsfon its argument and then returns the argument lifted in theMMonad. Combined with the property thatchain(m, lift<M>) == m, this provides a way of executing an action inside a monadic chain without influencing its overall result. This is useful to e.g. insert debug statements or perform actions that are not tied to the chain but that need to be executed inside of it.  More...
 | 
|  | 
| constexpr auto | then | 
|  | Sequentially compose two monadic actions, discarding any value produced by the first but not its effects.  More... 
 | 
|  | 
| constexpr auto | transform | 
|  | Map a function over a Functor.  More...
 | 
|  | 
| template<template< typename ... > class F> | 
| constexpr auto | template_ | 
|  | Lift a template to a Metafunction.Given a template class or template alias f,template_<f>is aMetafunctionsatisfying.  More...
 | 
|  | 
| template<template< typename ... > class F> | 
| constexpr auto | metafunction | 
|  | Lift a MPL-style metafunction to a Metafunction.Given a MPL-style metafunction, metafunction<f>is aMetafunctionsatisfying.  More...
 | 
|  | 
| template<typename F > | 
| constexpr auto | metafunction_class | 
|  | Lift a MPL-style metafunction class to a Metafunction.Given a MPL-style metafunction class, metafunction_class<f>is aMetafunctionsatisfying.  More...
 | 
|  | 
| constexpr auto | integral | 
|  | Turn a Metafunctioninto a function takingtypes and returning a default-constructed object.Given aMetafunctionf,integralreturns a newMetafunctionthat default-constructs an object of the type returned byf. More specifically, the following holds:  More...
 | 
|  | 
| template<template< typename ... > class F> | 
| constexpr auto | trait = hana::integral(hana::metafunction<F>) | 
|  | Alias to integral(metafunction<F>), provided for convenience.  More...
 | 
|  | 
| template<typename S > | 
| constexpr auto | unfold_left | 
|  | Dual operation to fold_leftfor sequences.Whilefold_leftreduces a structure to a summary value from the left,unfold_leftbuilds a sequence from a seed value and a function, starting from the left.  More...
 | 
|  | 
| template<typename S > | 
| constexpr auto | unfold_right | 
|  | Dual operation to fold_rightfor sequences.Whilefold_rightreduces a structure to a summary value from the right,unfold_rightbuilds a sequence from a seed value and a function, starting from the right.  More...
 | 
|  | 
| constexpr auto | unique | 
|  | Removes all consecutive duplicate elements from a Sequence.Given a Sequenceand an optional binary predicate,uniquereturns a new sequence containing only the first element of every subrange of the original sequence whose elements are all equal. In other words, it turns a sequence of the form[a, a, b, c, c, c, d, d, d, a]into a sequence[a, b, c, d, a]. The equality of two elements is determined by the providedpredicate, or byequalif nopredicateis provided.  More...
 | 
|  | 
| constexpr auto | unpack | 
|  | Invoke a function with the elements of a Foldable as arguments.Given a function and a foldable structure whose length can be known at compile-time, unpackinvokes the function with the contents of that structure. In other words,unpack(xs, f)is equivalent tof(x...), wherex...are the elements of the structure. The length of the structure must be known at compile-time, because the version off'soperator()that will be compiled depends on the number of arguments it is called with, which has to be known at compile-time.  More...
 | 
|  | 
| template<typename T > | 
| constexpr auto | value | 
|  | Return the compile-time value associated to a constant.This function returns the value associated to a Constant. That value is always a constant expression. The normal way of usingvalueon an objectcis.  More...
 | 
|  | 
| constexpr auto | value_of | 
|  | Equivalent to value, but can be passed to higher-order algorithms.This function object is equivalent tovalue, except it can be passed to higher order algorithms because it is a function object.valuecan't be passed to higher-order algorithms because it is implemented as an overloaded function.  More...
 | 
|  | 
| constexpr auto | while_ | 
|  | Apply a function to an initial state while some predicate is satisfied.This method is a natural extension of the whilelanguage construct to manipulate a state whose type may change from one iteration to another. However, note that having a state whose type changes from one iteration to the other is only possible as long as the predicate returns aLogicalwhose truth value is known at compile-time.  More...
 | 
|  | 
| template<typename M > | 
| constexpr auto | zero | 
|  | Identity of plus.  More...
 | 
|  | 
| constexpr auto | zip | 
|  | Zip one sequence or more.Given nsequencess1, ..., sn,zipproduces a sequence whosei-th element is a tuple of(s1[i], ..., sn[i]), wheresk[i]denotes thei-th element of thek-th sequence. In other words,zipproduces a sequence of the form.  More...
 | 
|  | 
| constexpr auto | zip_shortest | 
|  | Zip one sequence or more.Given nsequencess1, ..., sn,zip_shortestproduces a sequence whosei-th element is a tuple of(s1[i], ..., sn[i]), wheresk[i]denotes thei-th element of thek-th sequence. In other words,zip_shortestproduces a sequence of the form.  More...
 | 
|  | 
| constexpr auto | zip_shortest_with | 
|  | Zip one sequence or more with a given function.Given a n-ary functionfandnsequencess1, ..., sn,zip_shortest_withproduces a sequence whosei-th element isf(s1[i], ..., sn[i]), wheresk[i]denotes thei-th element of thek-th sequence. In other words,zip_shortest_withproduces a sequence of the form.  More...
 | 
|  | 
| constexpr auto | zip_with | 
|  | Zip one sequence or more with a given function.Given a n-ary functionfandnsequencess1, ..., sn,zip_withproduces a sequence whosei-th element isf(s1[i], ..., sn[i]), wheresk[i]denotes thei-th element of thek-th sequence. In other words,zip_withproduces a sequence of the form.  More...
 | 
|  |