Added pattern-matching in lectures

This commit is contained in:
Dmitry Boulytchev 2019-11-19 03:24:17 +03:00
parent dad4c35a80
commit d89cd76cd9
11 changed files with 247 additions and 27 deletions

View file

@ -1,9 +1,9 @@
lists := [
local lists = [
{},
{1, 2, 3, 4},
{{1}, {2, 3}, {4, {5, 6}}},
1 : 2 : 3 : 4 : {}
];
], i;
for i := 0, i<lists.length, i:=i+1 do
printf ("%s\n", lists[i].string)