Consider the following piece of code:
def f(x): if x == 0 or x == 1: return x return f(x - 1) + f(x - 2)
This function computes the fibonnaci sequence using recursion. The base cases are $x=0$ and $x=1$, in which case the function will return 0 or 1, respectively. In all other cases, the function will call itself to find the $x-1$ and $x-2$ fibonnaci numbers, and then add them together.
The function will not work correctly for inputs less than zero. Such inputs will result in an infinite recursion, as the function will keep subtracting one but never reach a base case that stops it.