- :string
- :dictionary
- :block
- or :nothing
insert
insert value in collection at given index
Parameters
insert collection :string :literal :dictionary :block index :integer :string value :any
Returns
Examples
copyinsert [1 2 3 4] 0 "zero" ; => ["zero" 1 2 3 4] print insert "heo" 2 "ll" ; hello
copydict: #[ name: John ] insert 'dict 'name "Jane" ; dict: [name: "Jane"]