summaryrefslogtreecommitdiff
path: root/doc/2_02_list_map_struct_alias.adoc
blob: adaccc7f03fbfb1ab6ba85eb2f0b43752ff1f7f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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'.