Skip to content

Pattern matching on booleans #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
darthdeus opened this issue Dec 20, 2014 · 1 comment
Open

Pattern matching on booleans #17

darthdeus opened this issue Dec 20, 2014 · 1 comment

Comments

@darthdeus
Copy link

I'm not really sure if I'm missing something, but why are you using case to pattern match on a boolean in the Haskell source, when all of those

case isVisited of
  True -> ...
  False -> ...

could be replaced by simple if isVisited then ... else ...?

@logicchains
Copy link
Owner

I just personally find pattern matching like that more aesthetically pleasing than the if then else construct. I assumed there wouldn't be any performance difference.

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

No branches or pull requests

2 participants