Created
September 30, 2016 12:35
-
-
Save ghik/407457ab853753c7356dc08b94e5f36d to your computer and use it in GitHub Desktop.
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 Zapieczętowany { | |
| def accept[T](forPrzypadek: JFunction[Przypadek,T], forNieSądzę: JFunction[NieSądzę,T]): T = this match { | |
| case p: Przypadek => forPrzypadek(p) | |
| case ns: NieSądzę => forNieSądzę(ns) | |
| } | |
| } | |
| case class Przypadek() extends Zapieczętowany | |
| case class NieSądzę() extends Zapieczętowany |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment