Logo

Programming-Idioms

History of Idiom 224 > diff from v8 to v9

Edit summary for version 9 by programming-idioms.org:
New Ruby implementation by user [programming-idioms.org]

Version 8

2020-04-22, 22:13:07

Version 9

2020-04-23, 07:42:55

Idiom #224 Add element to the beginning of the list

Insert element x at the beginning of list items.

Idiom #224 Add element to the beginning of the list

Insert element x at the beginning of list items.

Extra Keywords
prepend prefix start
Extra Keywords
prepend prefix start
Code
items.prepend(x)
Comments bubble
prepend is an alias for unshift
Doc URL
https://ruby-doc.org/core-2.5.0/Array.html#method-i-prepend