LPATHBench icon indicating copy to clipboard operation
LPATHBench copied to clipboard

Pattern matching on booleans

Open darthdeus opened this issue 10 years ago • 1 comments

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 ...?

darthdeus avatar Dec 20 '14 16:12 darthdeus

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.

logicchains avatar Dec 22 '14 12:12 logicchains