mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
Fixed bug in patters, pattern matching and tests
This commit is contained in:
parent
3e2c87d42f
commit
897af34aa9
7 changed files with 21 additions and 15 deletions
|
|
@ -79,13 +79,13 @@ public fun flatten (l) {
|
|||
|
||||
fun append (x) {
|
||||
local new = x : {};
|
||||
|
||||
|
||||
curr [0][1] := new;
|
||||
curr [0] := new
|
||||
}
|
||||
|
||||
|
||||
iter (fun (x) {iter (append, x)}, l);
|
||||
|
||||
|
||||
res [1]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import Collection;
|
|||
local a = {1, 2, 3}, b = {1, 2, 3}, t = emptyHashTab ();
|
||||
|
||||
t := addHashTab (t, a, 100);
|
||||
validateColl ();
|
||||
validateColl (t);
|
||||
printf ("HashTab internal structure: %s\n", t.string);
|
||||
|
||||
t := addHashTab (t, b, 200);
|
||||
validateColl ();
|
||||
validateColl (t);
|
||||
printf ("HashTab internal structure: %s\n", t.string);
|
||||
|
||||
printf ("Searching: %s\n", findHashTab (t, a).string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue