Пример #1
0
 public static Out <A> Execute <A>(this Subsystem <A> ma) =>
 ma();
Пример #2
0
 public static Subsystem <B> SelectMany <A, B>(
     this Subsystem <A> ma,
     Func <A, Subsystem <B> > f) =>
 ma.Bind(f);
Пример #3
0
 public static Subsystem <C> SelectMany <A, B, C>(
     this Subsystem <A> ma,
     Func <A, Subsystem <B> > bind,
     Func <A, B, C> project) =>
 ma.Bind(a => bind(a).Map(b => project(a, b)));
Пример #4
0
 public static Subsystem <B> Select <A, B>(
     this Subsystem <A> ma,
     Func <A, B> f) =>
 ma.Bind(a => Return(f(a)));