This is typical of functional languages where the function returns the last evaluated expression.
In an imperative context, this is an impractical restriction, since it is common to return early, for example when seeing if an array contains a certain element
contains(array, element) {
for(el in array) {
if(el == element) return true;
}
return false;
}
whereas in a functional context you would accomplish this with recursion
(define (contains array element)
(cond
((empty? array) false)
((eq (head array) element) true)
(else (contains (tail array) element))))