@@ -1227,21 +1227,31 @@ local exampleDocMultiline(mid, ex) =
1227
1227
name: 'foldl' ,
1228
1228
params: ['func' , 'arr' , 'init' ],
1229
1229
availableSince: '0.10.0' ,
1230
- description: |||
1231
- Classic foldl function. Calls the function on the result of the previous function call and
1232
- each array element, or <code>init</code> in the case of the initial element. Traverses the
1233
- array from left to right.
1234
- ||| ,
1230
+ description: html.paragraphs([
1231
+ |||
1232
+ Classic foldl function. Calls the function for each array element, passing the result from
1233
+ the previous call (or <code>init</code> for the first call), and the array element. Traverses
1234
+ the array from left to right.
1235
+ ||| ,
1236
+ |||
1237
+ For example: <code>foldl(f, [1,2,3], 0)</code> is equivalent to <code>f(f(f(0, 1), 2), 3)</code>.
1238
+ ||| ,
1239
+ ]),
1235
1240
},
1236
1241
{
1237
1242
name: 'foldr' ,
1238
1243
params: ['func' , 'arr' , 'init' ],
1239
1244
availableSince: '0.10.0' ,
1240
- description: |||
1241
- Classic foldr function. Calls the function on the result of the previous function call and
1242
- each array element, or <code>init</code> in the case of the initial element. Traverses the
1243
- array from right to left.
1244
- ||| ,
1245
+ description: html.paragraphs([
1246
+ |||
1247
+ Classic foldr function. Calls the function for each array element, passing the array element
1248
+ and the result from the previous call (or <code>init</code> for the first call). Traverses
1249
+ the array from right to left.
1250
+ ||| ,
1251
+ |||
1252
+ For example: <code>foldr(f, [1,2,3], 0)</code> is equivalent to <code>f(1, f(2, f(3, 0)))</code>.
1253
+ ||| ,
1254
+ ]),
1245
1255
},
1246
1256
{
1247
1257
name: 'range' ,
0 commit comments