All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.doolse.simpledba.CatsUtils.scala Maven / Gradle / Ivy

There is a newer version: 0.1.9
Show newest version
package io.doolse.simpledba

import cats.Applicative

/**
  * Created by jolz on 29/06/16.
  */
object CatsUtils {

  def whenM[F[_], A](b: Boolean, fa: => F[A])(implicit M: Applicative[F]): F[Unit] = if (b) M.map(fa)(_ => ()) else M.pure()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy