Skip to content

Simplify parsing cards#2

Open
jmorag wants to merge 1 commit into
mainfrom
simplify-parse
Open

Simplify parsing cards#2
jmorag wants to merge 1 commit into
mainfrom
simplify-parse

Conversation

@jmorag

@jmorag jmorag commented May 2, 2021

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread src/Euchre/Connections.hs
Just v -> Just (v, s)
_ -> Nothing
_ -> Nothing
parse bs = (,) <$> parseCardValue bs <*> parseSuit bs

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also be

parse bs = do
  val <- parseCardValue bs
  suit <- parseSuit bs
  return (val, suit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant