Recursive function use their states to loop. When you spawn new process, this process will be simply a loop with some defined state.