Files
mgmt/examples/lang/map-kv.mcl
James Shubin 422719c345 lang: core: map: Add functions to extract keys and values
Simple stuff, but now it's done!
2024-10-30 00:58:10 -04:00

22 lines
315 B
Plaintext

import "fmt"
import "map"
$some_map = {
"ottawa" => 6,
"toronto" => 7,
"montreal" => 8,
"vancouver" => 9,
}
print "keys" {
msg => fmt.printf("keys: %v", map.keys($some_map)),
Meta:autogroup => false,
}
print "values" {
msg => fmt.printf("values: %v", map.values($some_map)),
Meta:autogroup => false,
}