Principles, Best Practices and Design Patterns for functional programming

后端 未结 7 1515
我在风中等你
我在风中等你 2021-01-31 09:56

Are there any known principles, best-practices and design patterns that one can follow while writing code in a functional programming language?

7条回答
  •  长发绾君心
    2021-01-31 10:45

    There are folds, unfolds, maps, etc.

    I consider using them best practice, as it is pretty easy to reason about their behavior, and they often communicate the purpose of a function (for an example, just take a look at the famous Evolution of a Haskell Programmer and contrast freshman with senior, and with professor).

提交回复
热议问题