Fantasy-land: Any interest in adding a `Group` spec?

Created on 10 Aug 2017  路  2Comments  路  Source: fantasyland/fantasy-land

Groups for all?

image

While it is really strict and probably not grabbed for a lot, I was wondering if it would be beneficial to add a Group spec with the following bits and bobs:

Group

A value that implements the Group specification must also implement
the Monoid specification.

  1. g.concat(g.inverse()) is equivalent to g.empty() (right inverse)
  2. g.inverse().concat(g) is equivalent to g.empty() (left inverse)

inverse method

inverse :: Group g => g ~> () -> g

Most helpful comment

Well one person is good enough for me!!
Submitted this PR to address this issue.

All 2 comments

Actually. Maybe because it is on an instance, it should be more VERB-y and go with invert like Haskell.

Well one person is good enough for me!!
Submitted this PR to address this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidchambers picture davidchambers  路  9Comments

ulfryk picture ulfryk  路  4Comments

safareli picture safareli  路  16Comments

Raynos picture Raynos  路  3Comments

davidchambers picture davidchambers  路  15Comments