:: Monoid m => Bool -> m -> m package:base

If the first argument evaluates to True, then the result is the second argument. Otherwise an AssertionFailed exception is raised, containing a String with the source file and line number of the call to assert. Assertions can normally be turned on or off with a compiler flag (for GHC, assertions are normally on unless optimisation is turned on with -O or the -fignore-asserts option is given). When assertions are turned off, the first argument to assert is ignored, and the second argument is returned as the result.
This is a valid definition of stimes for a Monoid. Unlike the default definition of stimes, it is defined for 0 and so it should be preferred where possible.
This is a valid definition of stimes for an idempotent Monoid. When x <> x = x, this definition should be preferred, because it works in <math> rather than <math>
Repeat a value n times.
mtimesDefault n a = a <> a <> ... <> a  -- using <> (n-1) times
In many cases, stimes 0 a for a Monoid will produce mempty. However, there are situations when it cannot do so. In particular, the following situation is fairly common:
data T a = ...

class Constraint1 a
class Constraint1 a => Constraint2 a
instance Constraint1 a => Semigroup (T a)
instance Constraint2 a => Monoid (T a)
Since Constraint1 is insufficient to implement mempty, stimes for T a cannot do so. When working with such a type, or when working polymorphically with Semigroup instances, mtimesDefault should be used when the multiplier might be zero. It is implemented using stimes when the multiplier is nonzero and mempty when it is zero.

Examples

>>> mtimesDefault 0 "bark"
""
>>> mtimesDefault 3 "meow"
"meowmeowmeow"
The value of seq a b is bottom if a is bottom, and otherwise equal to b. In other words, it evaluates the first argument a to weak head normal form (WHNF). seq is usually introduced to improve performance by avoiding unneeded laziness. A note on evaluation order: the expression seq a b does not guarantee that a will be evaluated before b. The only guarantee given by seq is that the both a and b will be evaluated before seq returns a value. In particular, this means that b may be evaluated before a. If you need to guarantee a specific order of evaluation, you must use the function pseq from the "parallel" package.