{
  "id": "programming.functions.recursion-as-loop",
  "uri": "https://open-misconceptions.github.io/miscon-data/m/programming.functions.recursion-as-loop",
  "uuid": "fee3c932-6d7c-4816-aab9-c1dfe916ef15",
  "version": "0.1.1",
  "status": "draft",
  "trust": "low",
  "title": "A recursive call jumps back to the start",
  "statement": "A recursive call is a jump back to the beginning of the function, using the same variables, so there is only ever one copy of the function running.",
  "kind": "misapplied-analogy",
  "domain": "programming.functions",
  "about": [
    {
      "scheme": "Miscon",
      "uri": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.recursion"
    }
  ],
  "level_band": [
    "secondary",
    "undergraduate"
  ],
  "locale": "en",
  "evidence_patterns": [
    {
      "item_shape": "trace a recursive function that does work after the recursive call",
      "signature": "omits or misorders the work done after each call returns",
      "example": {
        "item": "def show(n):\n    if n == 0:\n        return\n    show(n - 1)\n    print(n)\nshow(3)",
        "expected": "1\n2\n3",
        "response": "3 2 1 (or nothing, or 1 only)"
      }
    }
  ],
  "discriminators": {
    "vs_slip": "Consistent across items with post-call work; the learner draws a single frame. A slip is a single ordering error.",
    "vs": {
      "programming.functions.base-case-not-needed": "Base-case omitters are diagnosed by termination questions; loop-model holders by post-call ordering."
    }
  },
  "relations": {
    "conflicts_with": [
      {
        "external": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.recursion",
        "label": "Each recursive call has its own activation with its own variables"
      }
    ],
    "resolved_by": [
      {
        "external": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.recursion",
        "label": "Each recursive call has its own activation with its own variables"
      }
    ],
    "confusable_with": [
      "programming.functions.base-case-not-needed"
    ]
  },
  "provenance": {
    "sources": [
      {
        "type": "paper",
        "citation": "Kahney, H. (1983). What do novice programmers know about recursion? In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI '83), 235-239.",
        "doi": "10.1145/800045.801618",
        "note": "The 'looping' model of recursion."
      },
      {
        "type": "paper",
        "citation": "Götschi, T., Sanders, I., & Galpin, V. (2003). Mental models of recursion. In Proceedings of the 34th SIGCSE Technical Symposium on Computer Science Education (SIGCSE '03), 346-350.",
        "doi": "10.1145/611892.612004",
        "note": "Mental models of recursion including looping and active/passive-flow models."
      }
    ],
    "origin": "llm-drafted",
    "notes": "Drafted from the cited literature for the Open Misconceptions seed pack; statement, examples and discriminators are original text. Awaiting maintainer review."
  },
  "history": {
    "changelog": [
      {
        "version": "0.1.1",
        "date": "2026-09-05",
        "change": "Schema 0.2 migration: about/alignments carry a free-string scheme (corestandards.org URLs relabelled CCSS where present); trust computed from reviews[] (none yet, so low); no change to the statement or evidence."
      }
    ]
  },
  "license": "CC-BY-4.0"
}
