Created
April 4, 2022 22:24
-
-
Save DamianReeves/54b441f9e086231537bc68f30f62c0bf to your computer and use it in GitHub Desktop.
Scala Type Lambda Trick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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