Recursion and the recursive keyword
As mentioned in the Recursion section in Chapter 3, Bosque Key Features, there is not much difference between Bosque and other popular programming languages when it comes to recursive processing. The only thing that is different is the recursive
keyword. In the aforementioned chapter, we learned that in order to declare and call a recursive function, we need to decorate it with the recursive
keyword. Without doubt, this practice helps a lot as we can just take a quick look at the code and tell immediately whether a function is recursive just by looking at the way it is called. However, we can declare a recursive function without using this keyword and it will work just fine. Have a look at this example:
function power(base: Float64, exp: Int): Float64 { return if (exp == 0) 1.0f else if (exp < 0) 1.0f / power(base, 0 - exp) ...