Cooling pies - another stab at tail recursion