Adds recursive max fn.