class Fib
{
	private const Fib* left, right;
	
	this()
	{
		left = right = null;
	}
	
	this(in Fib left, in Fib right)
	{
		this.left = &left;
		this.right = &right;
	}
	
	const int Evaluate()
	{
		if(left == null)
			return 1;
		
		return left.Evaluate() + right.Evaluate();
	}
}

Fib Bar(int n)
{
	if(n == 0 || n == 1)
		return new Fib;
	
	return new Fib(Bar(n - 1), Bar(n - 2));
}

void main()
{
	auto x = Bar(5);
	x.Evaluate();
}
