base-4.6.0.1: Basic libraries

Portability | portable
Stability | experimental
Maintainer | ashley@semantic.org
Safe Haskell | Trustworthy

Control.Category

Description

Synopsis

- class Category cat where
  - id :: cat a a
  - (.) :: cat b c -> cat a b -> cat a c
- (<<<) :: Category cat => cat b c -> cat a b -> cat a c
- (>>>) :: Category cat => cat a b -> cat b c -> cat a c

# Documentation

class Category cat where

A class for categories. id and (.) must form a monoid.

Methods

id :: cat a a

the identity morphism

(.) :: cat b c -> cat a b -> cat a c

morphism composition

Instances

Category (->) |
Monad m => Category (Kleisli m) |

(<<<) :: Category cat => cat b c -> cat a b -> cat a c

Right-to-left composition

(>>>) :: Category cat => cat a b -> cat b c -> cat a c

Left-to-right composition