-
-
Save dminuoso/6e411676f681471ab12bb7d1f2bfdb58 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
eurParser = do | |
eur <- digits | |
char(',') | |
cents <- cents | |
maybe (char '€') | |
pure (Eur eur cents) |
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
euroParser = | |
digits >-> eur { | |
char(',') >> | |
digits >-> cents { | |
maybe(char('€')) >> | |
pure Eur.new(eur, cents) | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment