A Basket sum in a more functional style