mno2
Haskell 趣學指南

Updated 2 years ago

nobodyzxc (@nobodyzxc) started discussion #29

a year ago · 0 comments

Open

而 (+) <$> (+3) <*> (*2) 會創見一個接受單一參數的一函數,將他同時餵給 (+3) 跟 (*2),然後呼叫 + 來將兩者加起來。同樣的道理,sequenceA [(+3),(*2)] 是製造一個接受單一參數的函數,他會將他餵給所有包含在 list 中的函數。但他最後不是呼叫 +,而是呼叫 : 跟 pure [] 來把結果接成一個 list,得到最後的結果。

Functors, Applicative Functors 與 Monoids (Edit this file)

typo "創見"

No description provided.

No comments on this discussion.


to join this conversation on GitBook. Already have an account? Sign in to comment
Notifications

You’re not receiving notifications from this thread.


1 participant