Creates a kumi::tuple containing N applications of the f Callable.
- Template Parameters
-
- Parameters
-
- Returns
- A tuple containing
N applications of f
Helper type
namespace kumi::result
{
template<std::
size_t N,
typename Function>
struct generate;
template<std::size_t N, typename Function>
using generate_t = typename generate<N, Function>::type;
}
constexpr auto generate(Function const &f) noexcept
Creates a kumi::tuple containing N applications of the f Callable.
Definition generate.hpp:70
Computes the return type of a call to kumi::generate
Example
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
auto t = [](auto p){ return 42.63 + p; };
std::cout << kumi::generate<7>(t) << "\n";
}