SemigroupLaw

A semigroup in type F must satisfy two laws:

  • '''closure''': ∀ a, b in F, append(a, b) is also in F. This is enforced by the type system.
  • '''associativity''': ∀ a, b, c in F, the equation append(append(a, b), c) = append(a, append(b , c)) holds.
class Object
trait Matchable
class Any

Value members

Concrete methods

def associative(f1: F, f2: F, f3: F)(implicit F: Equal[F]): Boolean
def unfoldlSumOptConsistency[S](s: S, f: S => Maybe[(S, F)])(implicit E: Equal[F]): Boolean
def unfoldrSumOptConsistency[S](s: S, f: S => Maybe[(F, S)])(implicit E: Equal[F]): Boolean