{"id":"recipe--lookup","name":"Find things by name","owner":"yeho","package":"recipes","kind":"recipe","signature":"start.yh","description":"Choose between a list, a map, and a set.","context":"A list is useful when you want the first, second, and third item. Sometimes you want the price of an apple without caring where apples sit in a list. A map connects a key, such as a name, to a value. A set answers a different question: have we already collected this badge? Adding the same badge twice does not make two badges. These collection features are experimental; use the supplied compiler route and check your target before shipping.","parameters":[],"returns":"","members":[],"tags":["cpu","recipe"],"updated":"2026-09-09","source":{"repository":"demonhunterlabs","path":"app/lib/yeho-walkthrough.ts"},"status":"complete-program","notes":["Add a pear price and ask for it. Then check for a missing key before trying to print its value."],"examples":[{"id":"program","title":"Find things by name","description":"Choose between a list, a map, and a set.","code":"map of text to int prices = [\"apple\" to 3, \"berry\" to 2]\nif prices.Contains(\"apple\")\n{\n    Console.Log(Text.From(prices[\"apple\"]))\n}\n\nset of text badges\nbadges.Add(\"explorer\")\nbadges.Add(\"explorer\")\nConsole.Log(Text.From(badges.count))","manifest":"manifestVersion = \"2\"\npackage = \"api.example.recipe__lookup\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","tags":["cpu"],"run":"cpu-oracle","expected":"3\n1","verification":"type checked","sha256":"856f4a0d58697d3b8f7d6cd840cdf873daa87dc1abe4fa130fca7d4bde36f430","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=recipe--lookup","json":"https://demonhunterlabs.com/reference/items/recipe--lookup.json","markdown":"https://demonhunterlabs.com/reference/text/recipe--lookup.md"}
