【问题标题】:Changing effect type of fs2.Stream改变 fs2.Stream 的效果类型
【发布时间】:2020-11-03 04:14:58
【问题描述】:

我正在使用可以生成fs2.Stream[ConnectionIO, Int] 的数据库行(在我的情况下为Int)的doobie。 ConnectionIO[A] 是 doobie 的内部类型。

给定 HKT F[_]val nt: ConnectionIO ~> F 有没有办法从 fs2.Stream[ConnectionIO, Int] 获取 fs2.Stream[F, Int]

我没有找到为fs2.Stream 定义的某种mapK

【问题讨论】:

    标签: scala functional-programming scala-cats fs2


    【解决方案1】:

    您要查找的方法称为translate,在某些情况下称为translateInterruptible

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-08-09
      • 2021-10-19
      • 2021-11-28
      • 1970-01-01
      • 1970-01-01
      • 2019-10-24
      • 1970-01-01
      相关资源
      最近更新 更多