perryprog
03/27/2018, 5:58 PMval commands = mapOf<Command, (WebSocket, List<String>) -> Unit>(
Command("ping", "A ping command") to { socket, _ ->
sendMessage(socket, "Pong!")
},
Command("help", "What you're reading") to { socket, subcommand ->
// Get the keys of this map here
}
)