1Array.addAt(3kaya)           Kaya module reference          Array.addAt(3kaya)
2
3
4

NAME

6       Array::addAt - Add an element to an array
7

SYNOPSIS

9       Void addAt( var [a] array, a elem, Int idx )
10

ARGUMENTS

12       array The array to act on
13
14       elem The new element
15
16       idx The index of the element to add before
17

DESCRIPTION

19       Add (in-place) an element before position idx
20
21
22
23    array = [1,2,3,4,5,6,7];
24    addAt(array,5,2);
25    // array = [1,2,5,3,4,5,6,7];
26

AUTHORS

28       Kaya   standard  library  by  Edwin  Brady,  Chris  Morris  and  others
29       (kaya@kayalang.org). For further information see http://kayalang.org/
30

LICENSE

32       The Kaya standard library is free software;  you  can  redistribute  it
33       and/or  modify  it  under  the  terms  of the GNU Lesser General Public
34       License (version 2.1 or any later version) as  published  by  the  Free
35       Software Foundation.
36
38       Array.push (3kaya) is equivalent to idx = size(array)
39       Array.removeAt (3kaya)
40       Array.unshift (3kaya) is equivalent to idx = 0
41
42
43
44Kaya                             December 2010              Array.addAt(3kaya)
Impressum