Module

Control.Semigroupoid

Package
purescript-prelude
Repository
purescript/purescript-prelude

#Semigroupoid Source

class Semigroupoid a  where

A Semigroupoid is similar to a Category but does not require an identity element id, just composable morphisms.

Semigroupoids must satisfy the following law:

  • Associativity: p <<< (q <<< r) = (p <<< q) <<< r

One example of a Semigroupoid is the function type constructor (->), with (<<<) defined as function composition.

Members

  • compose :: forall d c b. a c d -> a b c -> a b d

Instances

#(<<<) Source

Operator alias for Control.Semigroupoid.compose (right-associative / precedence 9)

#composeFlipped Source

composeFlipped :: forall d c b a. Semigroupoid a => a b c -> a c d -> a b d

Forwards composition, or compose with its arguments reversed.

#(>>>) Source

Operator alias for Control.Semigroupoid.composeFlipped (right-associative / precedence 9)