Trait Monoid
enso_prelude
pub trait Monoid: Default + Semigroup { fn times_mut(&mut self, n: usize) { ... } fn times(&self, n: usize) -> Self { ... } }
Mutable Monoid definition.
fn times_mut(&mut self, n: usize)
Repeat a value n times. Given that this works on a Monoid it will not fail if you request 0 or fewer repetitions.
fn times(&self, n: usize) -> Self
impl<T> Monoid for T where T: Default + Semigroup,