A 'sum' method that takes a block parameter