Test code 'Accumulate a value by applying a function - in two different styles'