monad
US /ˈmɑːn.æd/
UK /ˈmɒn.æd/
名词
1.
单子
an ultimate indivisible unit, as a simple substance or a living being
示例:
•
Leibniz's philosophy posits the universe as composed of countless monads.
莱布尼茨的哲学认为宇宙由无数的单子组成。
•
Each individual soul can be considered a unique monad.
每个独立的灵魂都可以被视为一个独特的单子。
2.
单子 (编程)
a structure that allows structuring computations by sequencing actions and composing functions, often used in functional programming
示例:
•
In Haskell, the IO monad is used to handle side effects.
在Haskell中,IO单子用于处理副作用。
•
Understanding the concept of a monad is crucial for advanced functional programming.
理解单子的概念对于高级函数式编程至关重要。