You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ch12.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ class Left extends Either {
90
90
91
91
## 作用组合
92
92
93
-
就我们的容器而言,不同的顺序会带来不同的结果,如果我有一个 `[Maybe a]`,它是一个包含可能的值的集合 (a collection of possible values);而如果我有一个 `Maybe [a]`,那是一个可能的包含值的集合 (a possible collection of values)。前者表示我们会宽容的保留那些"好"的值,而后者则意味着这是一个 "all or nothing" 的情况。类似地,`Either Error (Task Error a)` 可以表示一个客户端的验证,而 `Task Error (Either Error a)` 则会是一个服务端的验证。类型可以互换,为我们带来不同的作用。
93
+
就我们的容器而言,不同的顺序会带来不同的结果,如果我有一个 `[Maybe a]`,它是一个包含可能的值的集合 (a collection of possible values);而如果我有一个 `Maybe [a]`,那是一个可能的包含值的集合 (a possible collection of values)。前者表示我们会宽容地保留那些"好"的值,而后者则意味着这是一个 "all or nothing" 的情况。类似地,`Either Error (Task Error a)` 可以表示一个客户端的验证,而 `Task Error (Either Error a)` 则会是一个服务端的验证。类型可以互换,为我们带来不同的作用。
94
94
95
95
```js
96
96
// fromPredicate :: (a -> Bool) -> a -> Either e a
0 commit comments