Created
June 2, 2016 06:24
-
-
Save anonymous/b074c4ee5d0b9068b619e8b0f185acd6 to your computer and use it in GitHub Desktop.
the description for this gist
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
object PenInterpreterId extends (PencilInstruction ~> Id) { | |
def apply[A](fa: PencilInstruction[A]): Id[A] = fa match { | |
case PencilUp(p) => println(s"stop drawing at position $p") | |
case PencilDown(p) => println(s"start drawing at position $p") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment