inits package:monoid-subclasses

Returns the list of all prefixes of the argument, mempty first.