It’s not a recursive function call, look at it step-by-step:
terminal(stdout)– this simply returns a lambda which has capturedstdout- The result of 1. is called with the lambda
hello, which executes the lambda (func(term)), the result of which is passed toterminal(), which simply returns a lambda as in 1. - The result of 2. is called with the lambda
world, which does the same as 2, this time the return value is discarded…