Foldable instance for Chain.
Left-associative fold: f(f(f(initial, a1), a2), a3).
f(f(f(initial, a1), a2), a3)
Maps every element to the monoid M and combines the results.
M
Right-associative fold: f(a1, f(a2, f(a3, initial))).
f(a1, f(a2, f(a3, initial)))
Returns true when there are no elements.
Counts the elements.
Collects the elements into a list, preserving order.