|
![]() |
||||||||||||||
List TutorialListList is the most often used structured data type in functional programming languages. Lists in Wafl may consist of elements of any type, but all elements of any specific list have to have a same type. The length of a list is not related to the list type. List data type is written as List['1]. List literals are quoted by square brackets with elements separated by commas. Empty lists are written either by [] or nil. Source code:{# [], nil, [1,2,3], ['a','b','c'], [[1,2],[3,4,5],[6,7,8]] #} Result:{# [], [], [1,2,3], ["a","b","c"], [[1,2],[3,4,5],[6,7,8]] #}
|
|
||||||||||||||
© 2006 Saša Malkov | |||||||||||||||