def op(acc x) if mod(x 2) +(acc x) else acc end end # add odd numbers from 1 to 10 def main() display(fold(0 op list(1 2 3 4 5 6 7 8 9 10))) end