tofu.higherKind.bi.MonoidalBK.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tofu-core-higher-kind_3 Show documentation
Show all versions of tofu-core-higher-kind_3 Show documentation
Opinionated set of tools for functional programming in Scala
package tofu.higherKind.bi
trait MonoidalBK[U[f[_, _]]] extends SemigroupalBK[U] with PureBK[U] {
def mapb[F[_, _], G[_, _]](uf: U[F])(f: FunBK[F, G]): U[G] =
map2b(uf, unitB)(Fun2BK.apply[F, UnitBK]((fa, _) => f(fa)))
}
object MonoidalBK {
def apply[U[f[_, _]]](implicit u: MonoidalBK[U]): MonoidalBK[U] = u
}