Implemented fold.