Guards vs. if-then-else vs. cases in Haskell
From a technical standpoint, all three versions are equivalent. That being said, my rule of thumb for styles is that if you can read it as if it was English (read | as “when”, | otherwise as “otherwise” and = as “is” or “be”), you’re probably doing something right. if..then..else is for when you have … Read more