|
|
1.1 moko 1: @main[]
2:
3: $h[ $.key[value] ]
4: ^h.foreach[k;v]{ ^test[$h] }
5:
6: @test[h]
7: non-blocking hash operations:
8:
9: ^h._count[]
10: $k[^h._keys[]]
11: $h2[^hash::create[$h]]
12: $b[^h.contains[key]]
13: ^h.foreach[k;v]{$k=>$v}
14: ^h._at(0)
15:
16: blocking hash operations:
17:
18: $h2[ $.k[v] ]
1.2 ! moko 19: ^try-catch{ ^h2.sub[$h] }
! 20: ^try-catch{ $h.k[v] }
! 21: ^try-catch{ ^h.delete[k] }