Added fold implementation and example in C.