1Prelude.array(3kaya) Kaya module reference Prelude.array(3kaya)
2
3
4
6 Prelude::array - Coerce a linked list to an array.
7
9 [a] array( List<a> xs )
10
12 xs The list to convert
13
15 Converts a linked list to an array.
16
17
18 list = cons(2,cons(5,cons(3,nil)));
19 arr = array(list);
20 // arr = [2,3,5]
21
23 Kaya standard library by Edwin Brady, Chris Morris and others
24 (kaya@kayalang.org). For further information see http://kayalang.org/
25
27 The Kaya standard library is free software; you can redistribute it
28 and/or modify it under the terms of the GNU Lesser General Public
29 License (version 2.1 or any later version) as published by the Free
30 Software Foundation.
31
33 Prelude.List (3kaya)
34
35
36
37Kaya December 2010 Prelude.array(3kaya)