diff options
author | Adrian Thurston <thurston@colm.net> | 2019-09-11 18:53:11 -0600 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2019-09-11 18:53:11 -0600 |
commit | 26315e09ed7c87589a4304b98e5814d373596097 (patch) | |
tree | fb8280c77f882f29cffc6951ed612609af5b3feb /doc/colm/2_02_list_map_struct_alias.adoc | |
parent | 3ea27e431335497820ae0181d720f66820e636a7 (diff) | |
download | colm-26315e09ed7c87589a4304b98e5814d373596097.tar.gz |
lifed colm doc up to doc/colm
Diffstat (limited to 'doc/colm/2_02_list_map_struct_alias.adoc')
-rw-r--r-- | doc/colm/2_02_list_map_struct_alias.adoc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/colm/2_02_list_map_struct_alias.adoc b/doc/colm/2_02_list_map_struct_alias.adoc new file mode 100644 index 00000000..adaccc7f --- /dev/null +++ b/doc/colm/2_02_list_map_struct_alias.adoc @@ -0,0 +1,23 @@ +List, Map, Struct and alias +=========================== + +Next to the basic types, there are the normal things that we can expect from scripting languages. +As colm is static and strong typed, it is very convienient to use alias as well. + +An example is probably much clearer then 1000 loc. + +[source,chapel] +.poker.md +---- +include::code/poker.lm[] +---- + +When we run this we get: + +---- +ok john 18 + + spades King +---- + +NOTE: this also illustrates how to iterate through a 'list' and access elements in a 'map'. |