Folding Function as Function for Number Line