Good Haskell coding style of if/else control block?

后端 未结 8 1546
慢半拍i
慢半拍i 2021-01-31 09:15

I\'m learning Haskell in the hope that it will help me get closer to functional programming. Previously, I\'ve mostly used languages with C-like syntax, like C, Java, and D.

8条回答
  •  无人及你
    2021-01-31 09:44

    I use a coding style like your example from Wikibooks. Sure, it doesn't follow the C guidelines, but Haskell's not C, and it's fairly readable, especially once you get used to it. It's also patterned after the style of algorithms used in many textbooks, like Cormen.

提交回复
热议问题