Adding tail recursive list calculation