Questions tagged «enumerator»

1
Scalaz迭代:“提升” EnumeratorT以匹配“ IterateeT”以获得“更大”的单子
如果有EnumeratorT和,IterateeT我可以一起运行它们: val en: EnumeratorT[String, Task] = EnumeratorT.enumList(List("a", "b", "c")) val it: IterateeT[String, Task, Int] = IterateeT.length (it &= en).run : Task[Int] 如果枚举数monad比iteratee monad“更大”,我可以使用up或更广泛地说,Hoist“提升” iterae以匹配: val en: EnumeratorT[String, Task] = ... val it: IterateeT[String, Id, Int] = ... val liftedIt = IterateeT.IterateeTMonadTrans[String].hoist( implicitly[Task |>=| Id]).apply(it) (liftedIt &= en).run: Task[Int] 但是,当iteratee monad比枚举器monad“更大”时,我该怎么办? …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.