From f545c91581d0473362354577f105995d75444fba Mon Sep 17 00:00:00 2001 From: sogaiu <33044872+sogaiu@users.noreply.github.com> Date: Sat, 22 Aug 2026 20:00:11 +0000 Subject: [PATCH] Improve docstring for interleave (#1825) Co-authored-by: sogaiu <983021772@users.noreply.github.com> --- src/boot/boot.janet | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 4cf9733e..47a5d82b 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2007,9 +2007,17 @@ ret) (defn interleave - "Returns an array of the first elements of each col, then the second elements, etc." - [& cols] - (mapcat tuple ;cols)) + `` + Returns an array of the values of each element of `xs`, interleaved. + If the elements of `xs` do not all have the same number of values, + the shortest element of `xs` determines the number of values from + each element of `xs` that are contained in the returned array. + + Each element of `xs` can be a bytes, indexed, fiber, or abstract + type with suitable `get` and `next` methods. + `` + [& xs] + (mapcat tuple ;xs)) (defn distinct "Returns an array of the deduplicated values in `xs`."