{
  "id": "fn-core-type",
  "dataComponent": "core",
  "heading": {
    "title": "type",
    "badges": [
      "Core",
      "Builtin"
    ]
  },
  "synopsis": "Returns a string describing the runtime type of the given value (e.g., \"Int\", \"Str\", \"IntArray\", \"Fn\").",
  "codeBlocks": [
    "# Built‑in ⇒ you don’t need extend(\"core\")\\n\\n# Scalars\\nsput( type(123) )           // => \"Int\"\\nsput( type(3.14) )          // => \"Float\"\\nsput( type(\"hello\") )      // => \"Str\"\\nsput( type(true) )          // => \"Bool\"\\n\\n# Collections\\nsput( type([1,2,3]) )       // => \"IntArray\"\\nsput( type([name:\"Bob\"]) ) // => \"KeyedArray\"\\n\\n# Functions\\nf = x => x * 2\\nsput( type(f) )             // => \"Fn\""
  ],
  "notes": [
    "Accepts **exactly one argument** of any `Value` type.",
    "Returns a short string identifying that value’s runtime type. Common results include:",
    "- \"Int\", \"Float\", \"Bool\", \"Str\"",
    "- \"IntArray\", \"StrArray\", \"BoolArray\", \"KeyedArray\"",
    "- \"Fn\" (any function or lambda)",
    "If you pass the wrong number of arguments it raises an error immediately."
  ]
}

