mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Specify input types actions
This commit is contained in:
parent
7b033a48a3
commit
289de840fd
@ -1198,7 +1198,7 @@
|
|||||||
res)
|
res)
|
||||||
|
|
||||||
(defn reverse
|
(defn reverse
|
||||||
"Reverses the order of the elements in a given array or tuple and returns it
|
"Reverses the order of the elements in a given array or buffer and returns it
|
||||||
mutated."
|
mutated."
|
||||||
[t]
|
[t]
|
||||||
(def len-1 (- (length t) 1))
|
(def len-1 (- (length t) 1))
|
||||||
@ -1213,7 +1213,7 @@
|
|||||||
|
|
||||||
(defn reversed
|
(defn reversed
|
||||||
"Reverses the order of the elements in a given array or tuple and returns
|
"Reverses the order of the elements in a given array or tuple and returns
|
||||||
a new array."
|
a new array. If string or buffer is provided function returns array of chars reversed."
|
||||||
[t]
|
[t]
|
||||||
(def len (length t))
|
(def len (length t))
|
||||||
(var n (- len 1))
|
(var n (- len 1))
|
||||||
|
Loading…
Reference in New Issue
Block a user