Function: IterGenerate
public:
template <typename T, typename F>
TIterGenerate<T, F> IterGenerate(
F Functor
);
Iterator that generates values infinitely.
Useful for example for yielding random values, or anything that user would
want to generate procedurally. It is useful to combine it with Take
iterator to limit number of iterations in loop or for collecting values it
yields.
Example
// [?, ?, ?, ?, ?]
const TArray<int> Result = IterGenerate<int>([]() { return FMath::Rand(); }).Take(5).CollectArray();
Arguments
-
Functor
F Functor
Functor that should comply to signature:
T()
.
Documentation built with Unreal-Doc
v1.0.8 tool by PsichiX