Search code examples
scalaterminologyscala-cats

What does suffix -al convey in Semigroupal in contrast to Semigroup?


There exist Semigroup and Semigrupal

Semigroup[Int].combine(1, 41)                  // : Int = 42
Semigroupal[Option].product(Some(1), Some(41)) // : Option[(Int, Int)] = Some(value = (1, 41))

What is -al suffix meant to convey? In what sense does -al convey the distinction between Semigroup and Semigroupal? Similarly there is language of Monoid and Monoidal; is -al here conveying the distinction along the same lines?


Solution

  • See this paper on semigroupal categories. I don't believe a Semigroupal has to actually represent a semigroupal category, but its product operation is something semigroupal categories have as well.

    Similarly there is language of Monoid and Monoidal; is -al here conveying the distinction along the same lines?

    Yes, it's related in the same way (but monoidal categories seem to be much more widely used).