简体   繁体   中英

Scala Cats async functor

Is there some type of async functor in cats? Or a good way to emulate that sort of behavior?

For example something like

trait AsyncFunctor[F[_]] {
  def mapAsync[A, B](fa: F[A])(f: A => Future[B]): F[B]
}

cats-effect具有 monad,它可以描述产生确切结果的异步或同步计算

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM