/// <summary> /// Selects the many. /// </summary> /// <typeparam name="TU"></typeparam> /// <typeparam name="TResult">The type of the result.</typeparam> /// <param name="selector">The selector.</param> /// <param name="resultSelector">The result selector.</param> /// <returns></returns> public Monad <TResult> SelectMany <TU, TResult>(Func <T, Monad <TU> > selector, Func <T, TU, TResult> resultSelector) { return(Monad.Create(resultSelector(_value, selector(_value).Value))); }
/// <summary> /// Selects the specified selector. /// </summary> /// <typeparam name="TResult">The type of the result.</typeparam> /// <param name="selector">The selector.</param> /// <returns></returns> public Monad <TResult> Select <TResult>(Func <T, TResult> selector) { return(Monad.Create(selector(_value))); }