在Control.Applicative中命名`pure`函数 [英] Naming of `pure` function in Control.Applicative
本文介绍了在Control.Applicative中命名`pure`函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么在Control.Applicative中将一个值赋给一个名为 pure
的函数?
解决方案
将 Why is the function for lifting a value into a functor named Think of (As for the exact reason why it's called 这篇关于在Control.Applicative中命名`pure`函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!纯粹看作是一个形容词。
foo< *>在纯价值
= 4
上应用纯4 foo
。至于确切的原因,为什么叫做纯粹
,可能只有McBride帕特森会知道的。)pure
in Control.Applicative? 解决方案 pure
as an adjective.foo <*> pure 4
= foo
applied on a pure value 4
.pure
, probably only McBride and Paterson will know.)
查看全文