Recursive Doors

Prada store + Hitchcock Spellbound

Alfred Hitchcock, ‘Spellbound‘

IMG_8189.JPG

Prada Store

What is recursion?

It is the ability of a function to call (or invoke) itself. A function calling itself means that inside the body of the function we have a call to the same function. When we use recursion it will go on until we stop it. 

In some cases, we must call the function a fixed amount of times. In other cases, it will continue running until a conditional check tells it to stop. Either way, we must have a well defined stop condition in order to prevent the recursion from running forever (and overheating your computer) and causing a stack overflow.

When you think about recursion, know that it has to do two things:

  1. Call itself; and 

  2. Know when to stop calling itself.