示例#1
0
 public static Future <A> narrowK <A>(this HigherKind <W, A> hkt) => (Future <A>)hkt;
示例#2
0
 public static Id <A> narrowK <A>(this HigherKind <W, A> hkt) => (Id <A>)hkt;
示例#3
0
 public HigherKind <Id.W, B> map <A, B>(HigherKind <Id.W, A> data, Func <A, B> mapper) =>
 Id.a(mapper(data.narrowK().a));
示例#4
0
 public HigherKind <Option.W, B> map <A, B>(HigherKind <Option.W, A> data, Func <A, B> mapper) =>
 data.narrowK().map(mapper);
示例#5
0
 public static Option <A> narrowK <A>(this HigherKind <W, A> hkt) => (Option <A>)hkt;
示例#6
0
 [PublicAPI] public static HigherKind <Witness, B> map <Witness, A, B>(
     this HigherKind <Witness, A> hkt, Functor <Witness> F, Func <A, B> mapper
     ) => F.map(hkt, mapper);
示例#7
0
 public HigherKind <Option.W, B> flatMap <A, B>(
     HigherKind <Option.W, A> data,
     Fn <A, HigherKind <Option.W, B> > mapper
     ) => data.narrowK().flatMap(a => mapper(a).narrowK());
示例#8
0
 public HigherKind <Option.W, B> map <A, B>(HigherKind <Option.W, A> data, Fn <A, B> mapper) =>
 Functors.i.map(data, mapper);
示例#9
0
 public HigherKind <Id.W, B> flatMap <A, B>(
     HigherKind <Id.W, A> data,
     Fn <A, HigherKind <Id.W, B> > mapper
     ) => mapper(data.narrowK().a);
示例#10
0
文件: Monad.cs 项目: arturaz/pzd.lib
 public HigherKind <Id.W, B> map <A, B>(HigherKind <Id.W, A> data, Func <A, B> mapper) =>
 Functors.i.map(data, mapper);
示例#11
0
 public HigherKind <Future.W, B> map <A, B>(HigherKind <Future.W, A> data, Fn <A, B> mapper) =>
 data.narrowK().map(mapper);