/caterwaul/List/monad

Copy path to clipboard

Source

let cat = ../Category/Cat/semigroupal

let vObject = Type

let Set =
../Category/Monoidal/Cartesian/extractCategory
cat
vObject
Type
../Category/Set/monoidal/cartesian

in { unit = λ(a : Type) → λ(x : a) → [ x ]
, product =
λ(a : Type) →
λ(mma : List (List a)) →
List/fold
(List a)
mma
(List a)
(λ(x : List a) → λ(y : List a) → x # y)
([] : List a)
}
: ../Monad/Type Type Set List