1Array.subarray(3kaya) Kaya module reference Array.subarray(3kaya)
2
3
4
6 Array::subarray - Return a subarray
7
9 [a] subarray( [a] array, Int pos, Int n )
10
12 array The array to act on
13
14 pos The starting index
15
16 n The number of elements to retrieve
17
19 Return the subarray starting at position pos , n elements long. An
20 Exception is thrown if the subarray will not fit entirely within the
21 array.
22
23
24 array = [1,2,3,4,5,6,7];
25 sub = subarray(array,3,2);
26 // sub = [4,5]
27
29 Kaya standard library by Edwin Brady, Chris Morris and others
30 (kaya@kayalang.org). For further information see http://kayalang.org/
31
33 The Kaya standard library is free software; you can redistribute it
34 and/or modify it under the terms of the GNU Lesser General Public
35 License (version 2.1 or any later version) as published by the Free
36 Software Foundation.
37
39 Array.remove (3kaya)
40 Prelude.substr (3kaya)
41
42
43
44Kaya December 2010 Array.subarray(3kaya)