Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
override def act: Receive = {
case Command("calc", operation :: args, message) if args.length >= 1 =>
val op = possibleOperations.get(operation)
val response = => {
val result = f(_,_) )
OutboundMessage(, s"Results is: $result")
}).getOrElse(OutboundMessage(, s"No operation $operation"))
case Command("calc", _, message) =>
publish(OutboundMessage(, s"No arguments specified!"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.