Example #1
0
 /// <summary>
 /// Equivalent to <see cref="IFunctor{TSource}.Map{TResult}(Func{TSource, TResult})"/>, but restricted to <see cref="Memo{TState, TKey, TValue}"/>. Offers LINQ query support with one <c>from</c>-clause.
 /// </summary>
 /// <typeparam name="TState">The type of the state.</typeparam>
 /// <typeparam name="TKey">The key of the memoization.</typeparam>
 /// <typeparam name="TSource">The type of the source's value.</typeparam>
 /// <param name="source">The source.</param>
 /// <param name="f">The function to apply.</param>
 public static Memo <TState, TKey, TSource> Select <TState, TKey, TSource>(this Memo <TState, TKey, TSource> source, Func <TSource, TSource> f)
     where TState : IDictionary <TKey, TSource>
 => (Memo <TState, TKey, TSource>)source.MonoMap(f);