Method FromFunc
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Gamelogic.Extensions.dll
FromFunc<TResult>(Func<TResult>)
Makes a new generator from a generator function.
public static IGenerator<TResult> FromFunc<TResult>(Func<TResult> source)
Parameters
sourceFunc<TResult>The generator function that will be called to generate new elements.
Returns
- IGenerator<TResult>
Type Parameters
TResultThe type of elements to generate.
Exceptions
- ArgumentNullException
generator