Created
January 8, 2018 19:03
-
-
Save Jacoby6000/59fe46e86c3f61072c43f544ad8d1bf7 to your computer and use it in GitHub Desktop.
Free vs Tagless
This file contains hidden or 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
sealed trait Foo[A] | |
case class Bar[A](a: A) extends Foo[A] | |
case class Baz[A](s: String) extends Foo[A] | |
case class Woozle[A](foo: Foo[A]) extends Foo[A] |
This file contains hidden or 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
trait Foo[A, B] { | |
def bar(a: A): B | |
def baz(s: String): B | |
def woozle(b: B): B | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment