WordGarden.io
Back to search

recursion

C2
noun

Pronunciation

UK

  • /rɪkˈɜːʃən/

US

  • /rɪkˈɜːʃən/

Description

Recursion is like those Russian nesting dolls: each doll contains a smaller version of itself. In programming and mathematics, it means defining something in terms of itself. Think of a set of instructions that use the same steps again to solve a problem, breaking it into smaller, similar parts until an answer is reached. It is a useful way to handle complex tasks by repeating a process with changed inputs. You might also meet this idea in art or literature, such as a story within a story or a picture that includes itself.

Examples

  1. 1

    Programming example

    The lesson starts with a simple function that uses recursion to search a folder of files.

  2. 2

    Learning difficulty

    Many beginners find recursion confusing until they see where the process stops.

  3. 3

    Base case

    Without a clear base case, recursion can keep going until the program crashes.

    • Domain

      base case

      the condition that stops the repeated process

  4. 4

    Programmer joke

    "To understand recursion, you must first understand recursion" is a common joke among programmers.

    • Note

      This joke repeats the word on purpose to imitate recursion.

Forms and spellings

2 forms open this card.

Main spelling

  • recursionnoun

Forms

  • recursionspluralnoun