/// <summary> /// Extracts the value(s) from the source and replaces it with another one, ignoring the values of the source. /// </summary> /// <typeparam name="T">The type of the <see cref="IMonoMonad{T, TSource}"/>.</typeparam> /// <typeparam name="TSource">The type of the source.</typeparam> /// <param name="a">The value containing the source.</param> /// <param name="b">The value containing the result.</param> public static T ThenMono <T, TSource>(this IMonoMonad <T, TSource> a, T b) where T : IMonoMonad <T, TSource> => a.Bind(x => b);
/// <summary> /// A more readable alias to <see cref="IMonoMonad{T, TSource}.Bind(Func{TSource, T})"/>. /// </summary> /// <typeparam name="T">The type of the <see cref="IMonoMonad{T, TSource}"/>.</typeparam> /// <typeparam name="TSource">The type of the source.</typeparam> /// <param name="a">The value containing the source.</param> /// <param name="f">The function to apply.</param> public static T ThenMono <T, TSource>(this IMonoMonad <T, TSource> a, Func <TSource, T> f) where T : IMonoMonad <T, TSource> => a.Bind(f);