Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 7.rst #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chp/7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ Monad是一种强大的将函数链在一起的方法,在 `第十四章:Mona
运算符的计算的结果是第二个操作的结果,第一个操作的结果被丢弃了。
这和在 ``do`` 代码块中只有一行是类似的。
你可能会写 ``putStrLn "line 1" >> putStrLn "line 2"`` 来测试这一点。
它会打印出两行,把第一个 ``putStrLn`` 的结果丢掉了,值提供第二个操作的结果
它会打印出两行,把第一个 ``putStrLn`` 的结果丢掉了,只提供第二个操作的结果

``>>=`` 运算符运行一个操作,然后把它的结果传递给一个返回操作的函数。
那样第二个操作可以同样运行,而且整个表达式的结果就是第二个操作的结果。
Expand Down