semigroup fold