Beispiel #1
0
 public static IRxVal <Option <B> > optFlatMap <A, B>(
     this IRxVal <Option <A> > source, Fn <A, IRxVal <Option <B> > > extractor
     ) =>
 source.flatMap(aOpt =>
                aOpt.fold(
                    () => RxVal.cached(F.none <B>()),
                    extractor
                    )
                );
Beispiel #2
0
 public static IRxVal <Option <B> > optFlatMap <A, B>(
     this IRxVal <Option <A> > source, Fn <A, Option <IRxVal <Option <B> > > > extractor
     ) =>
 source.flatMap(aOpt =>
                aOpt.flatMap(extractor).getOrElse(RxVal.cached(F.none <B>()))
                );