Community
Modules 2

Data.Bifunctor.Swap

class Swap p

Symmetric Bifunctors.

'swap' . 'swap' = 'id'

If p is a Bifunctor the following property is assumed to hold:

'swap' . 'bimap' f g = 'bimap' g f . 'swap'

Swap isn't a subclass of Bifunctor, as for example


is not a Bifunctor but has Swap instance


swap :: p a b -> p b a

Instances

7
  • instance Swap (,)
  • instance Swap Either
  • instance Swap ((,,) x)
  • instance Swap ((,,,) x y)
  • instance Swap ((,,,,) x y z)
  • instance Swap ((,,,,,) x y z w)
  • instance Swap ((,,,,,,) x y z w v)
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.