Example #1
0
 public static Future <A> narrowK <A>(this HigherKind <W, A> hkt) => (Future <A>)hkt;
Example #2
0
 public static Id <A> narrowK <A>(this HigherKind <W, A> hkt) => (Id <A>)hkt;
Example #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));
Example #4
0
 public HigherKind <Option.W, B> map <A, B>(HigherKind <Option.W, A> data, Func <A, B> mapper) =>
 data.narrowK().map(mapper);
Example #5
0
 public static Option <A> narrowK <A>(this HigherKind <W, A> hkt) => (Option <A>)hkt;
Example #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);
Example #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());
Example #8
0
 public HigherKind <Option.W, B> map <A, B>(HigherKind <Option.W, A> data, Fn <A, B> mapper) =>
 Functors.i.map(data, mapper);
Example #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);
Example #10
0
 public HigherKind <Id.W, B> map <A, B>(HigherKind <Id.W, A> data, Func <A, B> mapper) =>
 Functors.i.map(data, mapper);
Example #11
0
 public HigherKind <Future.W, B> map <A, B>(HigherKind <Future.W, A> data, Fn <A, B> mapper) =>
 data.narrowK().map(mapper);