Skip to content

Instantly share code, notes, and snippets.

@DamianReeves
Created April 4, 2022 22:24
Show Gist options
  • Save DamianReeves/54b441f9e086231537bc68f30f62c0bf to your computer and use it in GitHub Desktop.
Save DamianReeves/54b441f9e086231537bc68f30f62c0bf to your computer and use it in GitHub Desktop.
Scala Type Lambda Trick
import zio.prelude._
sealed trait ValueCase[+TA,+VA,+Self] { self => }
object ValueCase {
// Would have cases defined
type Curry[A[+_, +_, +_], T, U] = { type Result[+V] = A[T, U, V] }
implicit def ValueCaseForEach[TA, VA]: ForEach[Curry[ValueCase, TA, VA]#Result]] = ???
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment