Actions
Feature #13118
closedArray#at(*indexes); Array#at([indexes])
Status:
Closed
Assignee:
-
Target version:
-
Description
It is useful to have Array return a repeated permutation. Rather than add another method, we could overload Array#at to take multiple indexes.
a = [ "a", "b", "c", "d", "e" ]
a.at(0) #=> "a"
a.at(-1) #=> "e"
#New stuff
a.at(0,1) #=> ["a", "b"]
a.at(0,0) #=> ["a", "a")
a.at([2,3]) #=> ["c", "d"]
a.at([-1,1]) #=> ["e", "b"]
Actions
Like0
Like0Like0Like0