本文整理了Java中cyclops.reactive.ReactiveSeq.tailRec
方法的一些代码示例,展示了ReactiveSeq.tailRec
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReactiveSeq.tailRec
方法的具体详情如下:
包路径:cyclops.reactive.ReactiveSeq
类名称:ReactiveSeq
方法名:tailRec
暂无
代码示例来源:origin: aol/cyclops
public static <T,R> Stream<R> tailRec(T initial, Function<? super T, ? extends Stream<? extends Either<T, R>>> fn) {
return ReactiveSeq.tailRec(initial,fn.andThen(ReactiveSeq::fromStream)).stream();
}
}
代码示例来源:origin: com.oath.cyclops/cyclops-pure
@Override
public <T, R> Higher<reactiveSeq, R> tailRec(T initial, Function<? super T, ? extends Higher<reactiveSeq, ? extends Either<T, R>>> fn) {
return ReactiveSeq.tailRec(initial,i->narrowK(fn.apply(i)));
}
代码示例来源:origin: com.oath.cyclops/cyclops
public static <T,R> Stream<R> tailRec(T initial, Function<? super T, ? extends Stream<? extends Either<T, R>>> fn) {
return ReactiveSeq.tailRec(initial,fn.andThen(ReactiveSeq::fromStream)).stream();
}
}
代码示例来源:origin: com.oath.cyclops/cyclops-pure
@Override
public <T, R> Higher<reactiveSeq, R> tailRec(T initial, Function<? super T, ? extends Higher<reactiveSeq, ? extends Either<T, R>>> fn) {
return ReactiveSeq.tailRec(initial,i->narrowK(fn.apply(i)));
}
代码示例来源:origin: com.oath.cyclops/cyclops-pure
@Override
public <T, R> Higher<reactiveSeq, R> tailRec(T initial, Function<? super T, ? extends Higher<reactiveSeq,? extends Either<T, R>>> fn) {
return Spouts.reactive(ReactiveSeq.deferFromStream( ()-> ReactiveSeq.tailRec(initial, fn.andThen(ReactiveSeq::narrowK))),ex);
}
};
代码示例来源:origin: com.oath.cyclops/cyclops-pure
@Override
public <T, R> Higher<io, R> tailRec(T initial, Function<? super T, ? extends Higher<io, ? extends Either<T, R>>> fn) {
return IO.fromPublisher(ReactiveSeq.tailRec(initial, i->narrowK(fn.apply(i)).stream() ));
}
代码示例来源:origin: com.oath.cyclops/cyclops-pure
@Override
public <T, R> Higher<stream, R> tailRec(T initial, Function<? super T, ? extends Higher<stream, ? extends Either<T, R>>> fn) {
return widen(ReactiveSeq.tailRec(initial, fn.andThen(s -> ReactiveSeq.fromStream(narrowK(s)))));
}
内容来源于网络,如有侵权,请联系作者删除!