public static void Execute <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, TEnvironment environment, Action <TValue> onValue) { TValue result = self.Run(environment); onValue(result); }
public ShareCore(IReaderMonad <TEnvironment, TValue> self, TEnvironment environmen) { _self = self; _environment = environmen; _lazy = Lazy.Create <TValue>(RunSelf); }
public static IIdentityMonad <TValue> Share <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, TEnvironment environment) { return(new ShareCore <TEnvironment, TValue>(self, environment)); }
public IfCore(IReaderMonad <TEnvironment, TValue> self, IReaderMonad <TEnvironment, TValue> elseSource, Func <TValue, bool> selector) { _self = self; _elseSource = elseSource; _selector = selector; }
public static IReaderMonad <TEnvironment, TValue> If <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, IReaderMonad <TEnvironment, TValue> elseSource, Func <TValue, bool> selector) { return(new IfCore <TEnvironment, TValue>(self, elseSource, selector)); }
public static IReaderMonad <TEnvironment, TValue> If <TEnvironment, TValue>(IReaderMonad <TEnvironment, TValue> thenSource, IReaderMonad <TEnvironment, TValue> elseSource, Func <bool> selector) { return(new IfStaticCore <TEnvironment, TValue>(thenSource, elseSource, selector)); }
public static IReaderMonad <TEnvironment, TEnvironment> Ask <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, Func <TEnvironment, TEnvironment> selector) { return(new AskSelectCore <TEnvironment, TValue>(self, selector)); }
public AskCore(IReaderMonad <TEnvironment, TValue> self) { }
public static IReaderMonad <TEnvironment, TEnvironment> Ask <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self) { return(new AskCore <TEnvironment, TValue>(self)); }
public static IReaderMonad <TEnvironment, TResult> Select <TEnvironment, TValue, TResult>(this IReaderMonad <TEnvironment, TValue> self, Func <TValue, TResult> selector) { return(new SelectCore <TEnvironment, TValue, TResult>(self, selector)); }
public SelectCore(IReaderMonad <TEnvironment, TValue> self, Func <TValue, TResult> selector) { _self = self; _selector = selector; }
public DoCore(IReaderMonad <TEnvironment, TValue> self, Action <TValue> action) { _self = self; _action = action; }
public static IReaderMonad <TEnvironment, TValue> Do <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, Action <TValue> action) { return(new DoCore <TEnvironment, TValue>(self, action)); }
public static IReaderMonad <TEnvironment, TResult> SelectMany <TEnvironment, TFirst, TSecond, TResult>(this IReaderMonad <TEnvironment, TFirst> self, Func <TFirst, IReaderMonad <TEnvironment, TSecond> > selector, Func <TFirst, TSecond, TResult> projector) { return(new SelectManyCore <TEnvironment, TFirst, TSecond, TResult>(self, selector, projector)); }
public static void Execute <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, TEnvironment environment) { self.Run(environment); }
public AskSelectCore(IReaderMonad <TEnvironment, TValue> self, Func <TEnvironment, TEnvironment> selector) { _selector = selector; }
public static IIdentityMonad <TValue> ToIdentity <TEnvironment, TValue>(this IReaderMonad <TEnvironment, TValue> self, TEnvironment environment) { return(self.Share(environment)); }
public IfStaticCore(IReaderMonad <TEnvironment, TValue> thenSource, IReaderMonad <TEnvironment, TValue> elseSource, Func <bool> selector) { _thenSource = thenSource; _elseSource = elseSource; _selector = selector; }