Band instances must satisfy scalaz.Semigroup.SemigroupLaw and 1 additional law:
Band instances must satisfy scalaz.Semigroup.SemigroupLaw and 1 additional law:
forall a. append(a, a) == a
A semigroup in type F must satisfy two laws:
A semigroup in type F must satisfy two laws:
∀ a, b in F, append(a, b) is also in F. This is enforced by the type system.∀ a, b, c in F, the equation append(append(a, b), c) = append(a, append(b , c)) holds.
The binary operation to combine f1 and f2.
The binary operation to combine f1 and f2.
Implementations should not evaluate the by-name parameter f2 if result
can be determined by f1.
An scalaz.Apply, that implements ap with append.
An scalaz.Apply, that implements ap with append. Note
that the type parameter α in Apply[λ[α => F]] is
discarded; it is a phantom type. As such, the functor cannot
support scalaz.Bind.
Every Semigroup gives rise to a scalaz.Compose, for which
the type parameters are phantoms.
Every Semigroup gives rise to a scalaz.Compose, for which
the type parameters are phantoms.
compose.semigroup = this
The default definition exploits idempotency to optimise to O(1)
scalaz.Semigroup which is also idempotent, i.e. appending a value with itself results in the same value.
scalaz.Band.BandLaw