Package

org.scalameta

algebra

Permalink

package algebra

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. algebra
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait Monoid[A] extends AnyRef

    Permalink

    https://en.wikipedia.org/wiki/Monoid

  2. implicit class XtensionMonoid[A] extends AnyRef

    Permalink

Value Members

  1. object M

    Permalink

    Sometimes the Scala parser/compiler is not happy about Monoid 'addition' and things like a + b where a and b are monoids of type A won't work because it thinks the + is for a String addition.

    Sometimes the Scala parser/compiler is not happy about Monoid 'addition' and things like a + b where a and b are monoids of type A won't work because it thinks the + is for a String addition.

    found : C required: String

    (from what I can gather it doesn't work when there is a type parameter C >: B : Monoid and then we want to do 'addition' on two monoids of type C) Even if one defines another operator, say |+|, it stills fails with an error of that kind: Error:(81, 45) value |+| is not a member of type parameter C

    Fun fact: intelliji actually parses things correctly!

    So this is why the weird object M exists, to 'lift' a Monoid.

  2. object Monoid

    Permalink

    Different base implementation of several instances of Monoids

Inherited from AnyRef

Inherited from Any

Ungrouped