mirror of
https://github.com/janet-lang/janet
synced 2025-06-11 02:54:12 +00:00
Merge pull request #1581 from sogaiu/fix-mapcat-and-keep-docstrings
Fix mapcat and keep docstrings
This commit is contained in:
commit
06d01c099f
@ -1103,8 +1103,9 @@
|
|||||||
and use `array/concat` to concatenate the results, but only if
|
and use `array/concat` to concatenate the results, but only if
|
||||||
no `inds` are provided. Multiple data structures can be handled
|
no `inds` are provided. Multiple data structures can be handled
|
||||||
if each `inds` is a data structure and `f` is a function of
|
if each `inds` is a data structure and `f` is a function of
|
||||||
arity one more than the number of `inds`. The resulting array
|
arity one more than the number of `inds`. Note that `f` is only
|
||||||
has a length that is the shortest of `ind` and each of `inds`.
|
applied to values at indeces up to the largest index of the
|
||||||
|
shortest of `ind` and each of `inds`.
|
||||||
```
|
```
|
||||||
[f ind & inds]
|
[f ind & inds]
|
||||||
(def res @[])
|
(def res @[])
|
||||||
@ -1143,8 +1144,8 @@
|
|||||||
structure `ind`, but only if no `inds` are provided. Multiple
|
structure `ind`, but only if no `inds` are provided. Multiple
|
||||||
data structures can be handled if each `inds` is a data
|
data structures can be handled if each `inds` is a data
|
||||||
structure and `pred` is a function of arity one more than the
|
structure and `pred` is a function of arity one more than the
|
||||||
number of `inds`. The resulting array has a length that is the
|
number of `inds`. The resulting array has a length that is no
|
||||||
shortest of `ind` and each of `inds`.
|
longer than the shortest of `ind` and each of `inds`.
|
||||||
```
|
```
|
||||||
[pred ind & inds]
|
[pred ind & inds]
|
||||||
(def res @[])
|
(def res @[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user