[docs] [issue16077] fix code example in docs for built-in reduce()