Skip to content

Instantly share code, notes, and snippets.

Created June 2, 2016 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4e81c4dd044caa3d36a735262fd497c2 to your computer and use it in GitHub Desktop.
Save anonymous/4e81c4dd044caa3d36a735262fd497c2 to your computer and use it in GitHub Desktop.
the description for this gist
final class FreeInjectPartiallyApplied[F[_], G[_]] private[free] {
def apply[A](fa: F[A])(implicit I : Inject[F, G]): Free[G, A] =
Free.liftF(I.inj(fa))
}
def inject[F[_], G[_]]: FreeInjectPartiallyApplied[F, G] = new FreeInjectPartiallyApplied
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment