swap and assoc: Symmetric and Semigroupy Bifunctors

LTS Haskell 16.15:1.0.2
Stackage Nightly 2020-09-26:1.0.2
Latest on Hackage:1.0.2

See all snapshots assoc appears in

BSD-3-Clause licensed and maintained by Oleg Grenrus

Module documentation for 1.0.2

This version can be pinned in stack with:assoc-1.0.2@sha256:0be532f389dcaf4969c9e1066e1dca41b08ca4272d1b88450f552281d93106cb,1183

Provides generalisations of swap :: (a,b) -> (b,a) and assoc :: ((a,b),c) -> (a,(b,c)) to Bifunctors supporting similar operations (e.g. Either, These).



  • Add ‘Swap’ instances for more n-tuples


  • Add Assoc Const and Tagged instances
Depends on 3 packages(full list with versions):
Used by 2 packages in nightly-2020-09-16(full list with versions):