函数式编程的原则,最佳实践和设计模式 [英] Principles, Best Practices and Design Patterns for functional programming

查看:154
本文介绍了函数式编程的原则,最佳实践和设计模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编写函数式编程语言中的代码时可以使用哪些已知的原则,最佳实践和设计模式?

解决方案

有褶皱,展开,地图等。

我考虑使用他们的最佳实践,因为它很容易推断他们的行为,他们经常传达一个函数的目的(例如,只要看看着名的一个Haskell程序员的演变过程和大四与老师的对比)

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

解决方案

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

这篇关于函数式编程的原则,最佳实践和设计模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆