Traversable instance for Chain.
Applies f to every value inside v.
f
v
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)))
Implements Invariant.imap by ignoring the backward function.
Returns true when there are no elements.
Counts the elements.
Turns a structure of effects inside out into an effect producing a structure.
Collects the elements into a list, preserving order.
Applies the effectful f to each element and combines the effects with applicative.
applicative