concept recursion in category kotlin

This is an excerpt from Manning's book Functional Programming with Kotlin.
In order to adapt our existing program to demonstrate HOFs, we should introduce some new behaviour. We will do so by adding a new function that calculates the nth factorial. To write this simple function, we will need to take a short detour by showing how loops are written in a purely functional way. We do this by introducing recursion.

This is an excerpt from Manning's book The Joy of Kotlin.
4.1 Corecursion and recursion
Corecursion is composing computation steps by using the output of one step as the input of the next one, starting with the first step. Recursion is the same operation but starts with the last step. Let’s take as an example a list of characters that you want to join into a string representation.