本文整理了Java中cyclops.reactive.ReactiveSeq.foldMapRight
方法的一些代码示例,展示了ReactiveSeq.foldMapRight
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReactiveSeq.foldMapRight
方法的具体详情如下:
包路径:cyclops.reactive.ReactiveSeq
类名称:ReactiveSeq
方法名:foldMapRight
[英]Attempt to transform this Monad to the same type as the supplied Monoid (using mapToType on the monoid interface) Then use Monoid to reduce values
ReactiveSeq.of(1,2,3).foldRightMapToType(Reducers.toString(""));
[中]尝试将此Monad转换为与提供的Monoid相同的类型(在Monoid接口上使用mapToType),然后使用Monoid减少值
ReactiveSeq.of(1,2,3).foldRightMapToType(Reducers.toString(""));
代码示例来源:origin: aol/cyclops
/**
* Attempt to transform this Monad to the same type as the supplied Monoid (using mapToType on the monoid interface)
* Then use Monoid to reduce values
* <pre>
{@code
Streamable.of(1,2,3).foldRightMapToType(Reducers.toString(""));
// "321"
}
</pre>
*
*
* @param reducer Monoid to reduce values
* @return Reduce result
*/
@Override
default <R> R foldMapRight(final Reducer<R,T> reducer) {
return this.stream().foldMapRight(reducer);
}
代码示例来源:origin: aol/cyclops
/**
* Attempt to transform this Monad to the same type as the supplied Monoid (using
* mapToType on the monoid interface) Then use Monoid to reduce values
*
* <pre>
* {@code
* ReactiveSeq.of(1,2,3).foldMapRight(Reducers.toString(""));
*
* // "321"
* }
* </pre>
*
*
* @param reducer
* Monoid to reduce values
* @return Reduce result
*/
default <R> R foldMapRight(final Reducer<R,T> reducer) {
return stream().foldMapRight(reducer);
}
代码示例来源:origin: com.oath.cyclops/cyclops
/**
* Attempt to transform this Monad to the same type as the supplied Monoid (using mapToType on the monoid interface)
* Then use Monoid to reduce values
* <pre>
{@code
Streamable.of(1,2,3).foldRightMapToType(Reducers.toString(""));
// "321"
}
</pre>
*
*
* @param reducer Monoid to reduce values
* @return Reduce result
*/
@Override
default <R> R foldMapRight(final Reducer<R,T> reducer) {
return this.stream().foldMapRight(reducer);
}
代码示例来源:origin: com.oath.cyclops/cyclops
/**
* Attempt to transform this Monad to the same type as the supplied Monoid (using
* mapToType on the monoid interface) Then use Monoid to reduce values
*
* <pre>
* {@code
* ReactiveSeq.of(1,2,3).foldMapRight(Reducers.toString(""));
*
* // "321"
* }
* </pre>
*
*
* @param reducer
* Monoid to reduce values
* @return Reduce result
*/
default <R> R foldMapRight(final Reducer<R,T> reducer) {
return stream().foldMapRight(reducer);
}
内容来源于网络,如有侵权,请联系作者删除!