Community
Modules 2

Data.Bifunctor.Assoc

class Bifunctor p => Assoc p

"Semigroup-y" Bifunctors.

'assoc' . 'unassoc' = 'id'
'unassoc' . 'assoc' = 'id'
'assoc' . 'bimap' ('bimap' f g) h = 'bimap' f ('bimap' g h) . 'assoc'

This library doesn't provide Monoidal class, with left and right unitors. Are they useful in practice?

assoc :: p (p a b) c -> p a (p b c)

unassoc :: p a (p b c) -> p (p a b) c

Instances

3
  • instance Assoc (,)
  • instance Assoc Either
  • instance Assoc Const
Build record and source files

Community contribution. The service has not verified this documentation.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-aa6debbd-web-3

Metadata snapshot: 0c7a7329d9f82f4bf6cdc1fec74e358415ba46a3f9c9481cda158f1a97f8e4aa

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.