File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ When you need to deal with failure, you have several options.
110110 2 . ** Alt**
111111 3 . ** MonadError**
112112
113- ### 1. Attempt
113+ #### 1. Attempt
114114
115115If you want to attempt a computation but recover from failure, you can use the ` attempt ` function:
116116
@@ -125,7 +125,7 @@ do e <- attempt $ Ajax.get "http://foo.com"
125125 liftEff $ either (const $ trace "Oh noes!") (const $ trace "Yays!") e
126126```
127127
128- ### 2. Alt
128+ #### 2. Alt
129129
130130Because ` Aff ` has an ` Alt ` instance, you may also use the operator ` <|> ` to provide an alternative computation in the event of failure:
131131
@@ -134,7 +134,7 @@ do result <- Ajax.get "http://foo.com" <|> Ajax.get "http://bar.com"
134134 return result
135135```
136136
137- ### 3. MonadError
137+ #### 3. MonadError
138138
139139` Aff ` has a ` MonadError ` instance, which comes with two functions: ` catchError ` , and ` throwError ` .
140140
You can’t perform that action at this time.
0 commit comments