mirror of
https://github.com/janet-lang/janet
synced 2025-09-19 19:24:12 +00:00
Fix take/drop comments.
This commit is contained in:
@@ -707,7 +707,7 @@
|
|||||||
[n xs]
|
[n xs]
|
||||||
(def use-str (bytes? xs))
|
(def use-str (bytes? xs))
|
||||||
(def f (if use-str string/slice tuple/slice))
|
(def f (if use-str string/slice tuple/slice))
|
||||||
# make sure end in [0, len]
|
# make sure end is in [0, len]
|
||||||
(def end (max 0 (min n (length xs))))
|
(def end (max 0 (min n (length xs))))
|
||||||
(f xs 0 end))
|
(f xs 0 end))
|
||||||
|
|
||||||
@@ -730,7 +730,7 @@
|
|||||||
[n xs]
|
[n xs]
|
||||||
(def use-str (bytes? xs))
|
(def use-str (bytes? xs))
|
||||||
(def f (if use-str string/slice tuple/slice))
|
(def f (if use-str string/slice tuple/slice))
|
||||||
# make sure start in [0, len]
|
# make sure start is in [0, len]
|
||||||
(def start (max 0 (min n (length xs))))
|
(def start (max 0 (min n (length xs))))
|
||||||
(f xs start -1))
|
(f xs start -1))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user