scalaz/scalaz — Issue #77: Overridable multiply and multiply for Semigroup and Group  
Author: anrizal06
Created: 2012-02-26 19:42:27+00:00
State: open

This issue is taken from the discussion in the mailing list: https://groups.google.com/forum/?fromgroups#!topic/scalaz/3yI9rJ2Srhw

Basically, the request is to have an overridable multiply for Semigroup, Monoid, and Group. This allows alternative implementation of multiply (e.g by directly doing integer multiplication).

Another side of the request is to have default implementation for Semigroup and Group. For Semigroup, it should accept positive multiplier only, while for Group it should accept also negative multiplier.

The return value of multiply can be an `Option[A]`, this will give the signature: `def multiply(value: F, n: Int): Option[F]`