Add the reduce method for turing's functional library