assoc-1.0.2: swap and assoc: Symmetric and Semigroupy Bifunctors
Safe Haskell Safe-Inferred
Language Haskell2010

Data.Bifunctor.Assoc

Synopsis

Documentation

class Bifunctor p => Assoc p where Source #

"Semigroup-y" Bifunctor s.

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?

Methods

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

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