Finch/tests/run/maps.out
Nexoniarz b872be3176 Finch 2.4.0: methods, maps, errors as values; str() of any value; macOS and ARM64 docs; Kate support
- fn Struct.method(...) with self by reference, also on C structs
- map[K]V: insertion-ordered hash maps, literals, m[k] += 1, has/get/remove/keys/values
- -> T! / -> !, return error(...), or <value>, or { err }, try; fallible int/float/read_file/write_file/delete_file
- for i, x in list / for k, v in map
- print and str() share one text formatter
- LSP: method and map completion, method signatures; grammar and snippets for VS Code and Kate
- tests: 74 (methods, errors, maps + 11 failure cases); docs at all three levels, en and pl

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:11:12 +02:00

27 lines
479 B
Text

{"anna": 31, "bob": 26, "cyril": 40} 3
31 true false -1
anna is 31
bob is 26
cyril is 40
anna
bob
cyril
true false {"anna": 31, "cyril": 40}
["anna", "cyril", "dave"] [31, 40, 19]
{"the": 3, "cat": 1, "and": 2, "dog": 1, "bird": 1}
{"the": 3, "cat": 1, "and": 2, "dog": 1, "bird": 1}
{"even": [0, 2, 4, 6, 8], "odd": [1, 3, 5, 7, 9]}
5 0
1 2 ["a", "e"]
2 2 ["bb", "cc"]
3 1 ["ddd"]
344 111277621 998001 false
['h', 'e', 'l', 'o']
{} 0 3
{"x": "1"}
0 zero
1 one
2 two
0 h
1 e
2 y