'Stackoverflow when concatenating lambda expressions

If I use

Func<int, bool> f = x => false;

Then update:

f = x => f(x) || false;

Then

f(0) 

causes a stackoverflow.

I do know the late evaluation cause the stackoverflow. But how to solve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source