Last active
June 4, 2020 11:42
-
-
Save dariathecracker/7139ab75a2f5054bdbd5dbc1d84c528d to your computer and use it in GitHub Desktop.
Implementation
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
def parse(input: String): UIO[MenuCommand] = | |
UIO.succeed(input) map { | |
case "new game" => MenuCommand.NewGame | |
case "resume" => MenuCommand.Resume | |
case "quit" => MenuCommand.Quit | |
case _ => MenuCommand.Invalid | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment