builtinFlatMapArray is like builtinFlatMap, but only accepts array as the arrv value. Desugared comprehensions contain a call to this function, rather than builtinFlatMap, so that a better error message is printed when the comprehension would iterate over a non-array.
(i *interpreter, funcv, arrv value)
| 350 | // than builtinFlatMap, so that a better error message is printed when the |
| 351 | // comprehension would iterate over a non-array. |
| 352 | func builtinFlatMapArray(i *interpreter, funcv, arrv value) (value, error) { |
| 353 | switch arrv := arrv.(type) { |
| 354 | case *valueArray: |
| 355 | return builtinFlatMap(i, funcv, arrv) |
| 356 | default: |
| 357 | return nil, i.typeErrorSpecific(arrv, &valueArray{}) |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | func joinArrays(i *interpreter, sep *valueArray, arr *valueArray) (value, error) { |
| 362 | result := make([]*cachedThunk, 0, arr.length()) |
nothing calls this directly
no test coverage detected
searching dependent graphs…