Created
December 6, 2022 00:49
-
-
Save vhxs/d305bb7306d71ecd4554888cd8ddd8a4 to your computer and use it in GitHub Desktop.
Parsing in Haskell
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
amount line = read (splitOn "from" ((splitOn "move" line)!!1)!!0) :: Int | |
src line = read (splitOn "to" ((splitOn "from" line)!!1)!!0) :: Int | |
dst line = read (splitOn "to" ((splitOn "from" line)!!1)!!1) :: Int |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment