Created
May 13, 2015 18:33
-
-
Save pjazdzewski1990/d79afb990106646f885c to your computer and use it in GitHub Desktop.
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
val behavior: Behavior[HumanCommand] = | |
Total { | |
case Eat(food) ⇒ | |
println(s"Tasty $food!") | |
Stopped | |
case Wait() ⇒ | |
Same | |
} | |
val log: PartialFunction[MessageOrSignal[HumanCommand], Unit] = { | |
case m: Msg => logger.info(s"Got message $m") | |
case s: Sig => logger.info(s"Got signal $s") | |
} | |
val behaviorTapped: Behavior[HumanCommand] = | |
Tap(log, behavior) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment