cyclops.reactive.ReactiveSeq.foldMapRight()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中cyclops.reactive.ReactiveSeq.foldMapRight方法的一些代码示例,展示了ReactiveSeq.foldMapRight的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReactiveSeq.foldMapRight方法的具体详情如下:
包路径:cyclops.reactive.ReactiveSeq
类名称:ReactiveSeq
方法名:foldMapRight

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);
}

相关文章

微信公众号

最新文章

更多

ReactiveSeq类方法