Callable object creating a kumi::tuple containing N applications of the f Callable.
#include <kumi/algorithm/generate.hpp>
template<std::size_t, typename Function>
constexpr generate_t< N > generate
Callable object creating a kumi::tuple containing N applications of the f Callable.
Definition generate.hpp:99
- N: Number of replications
- f: Callable object to apply
- A tuple containing N applications of f
template<std::
size_t N,
typename Function>
struct generate
{
};
template<std::size_t N, typename Function> using generate_t = typename kumi::result::generate<N, Function>::type;
Computes the return type of a call to kumi::generate
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
auto t = [](auto p){ return 42.63 + p; };
std::cout << kumi::generate<7>(t) << "\n";
}