A fold (from the left) is a higher-order relation between:
For example: Use foldl/4 to express the sum of all elements in a list, using a predicate as a building block to define the sum of two elements:
foldl/4
?- foldl(plus, [2,3,4], 0, S). S = 9.