Skip to content

Instantly share code, notes, and snippets.

@Jacoby6000
Created January 8, 2018 19:03
Show Gist options
  • Save Jacoby6000/59fe46e86c3f61072c43f544ad8d1bf7 to your computer and use it in GitHub Desktop.
Save Jacoby6000/59fe46e86c3f61072c43f544ad8d1bf7 to your computer and use it in GitHub Desktop.
Free vs Tagless
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]
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