{"id":"type--map-of-K-to-V-113649","name":"map of K to V","owner":"yeho","package":"language.types","kind":"type","signature":"map of K to V","description":"A lookup from keys of type K to values of type V, such as item names and prices.","context":"A focused reference with a complete example. Numeric widths and experimental types still depend on the selected backend.","parameters":[],"returns":"","members":[],"tags":["containers-and-handles","cpu","language","type","yeho"],"updated":"2026-09-09","source":{"repository":"demonhunterlabs","path":"app/lib/yeho-language-reference.ts"},"status":"documented","notes":[],"examples":[{"id":"complete-0","title":"Lookup table","description":"Use a map for lookup by identity or name when sequential scanning would hide the intent.","code":"map of text to int power = [\"sun\" to 100, \"moon\" to 70]\nint sunPower = power[\"sun\"]\n\nif power.Contains(\"moon\")\n{\n    Console.Log(Text.From(power[\"moon\"]))\n}\n","tags":["cpu","language"],"run":"cpu-oracle","expected":null,"verifyRun":false,"manifest":"manifestVersion = \"2\"\npackage = \"api.example.language__maps\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","verification":"type checked","sha256":"8bd027b1f80d4e53038db8cc51f312f7bfab529ad1f4bd726deda35dfe84fb8f","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=type--map-of-K-to-V-113649","json":"https://demonhunterlabs.com/reference/items/type--map-of-K-to-V-113649.json","markdown":"https://demonhunterlabs.com/reference/text/type--map-of-K-to-V-113649.md"}
