> For the complete documentation index, see [llms.txt](https://aloy.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aloy.gitbook.io/notes/books/sicp/impt.md).

# Recursion thought process

base case + greedy solution

```py
def add(a,b):
  if a>b:
    return 0
  return a + add(a+1,b)

"""
add(2,5)
= 2 + add(3,5)
= a + add(a+1,b)
"""

```
