- micro : Functor f =>
Corecursive f
a =>
(b ->
Either a
(f b)) ->
b ->
a
Anamorphism that allows shortcuts.
- mhisto : ((y ->
c) ->
(y ->
f y) ->
f y ->
c) ->
Fix f ->
c
Mendler's histomorphism
- meta : Functor f =>
Corecursive f
t' =>
Recursive g
t =>
(a ->
f a) ->
(b ->
a) ->
(g b ->
b) ->
t ->
t'
Gibbons' metamorphism. Tear down a structure, transform it, and then build up a new structure
- mcata : ((y ->
c) ->
f y ->
c) ->
Fix f ->
c
Mendler's catamorphism
- hyloPro : Functor f =>
Functor g =>
(f a ->
a) ->
(g c ->
f c) ->
(b ->
g b) ->
b ->
a
Erwig's metamorphism. Essentially a hylomorphism with a natural
transformation in between. This allows us to use more than one functor in a
hylomorphism.
- elgot : Functor f =>
(f a ->
a) ->
(b ->
Either a
(f b)) ->
b ->
a
Elgot algebra (see this paper)
- dynaPro : Functor f =>
Functor g =>
(f (Cofree f
a) ->
a) ->
(g c ->
f c) ->
(b ->
g b) ->
b ->
a
A dynamorphism builds up with an anamorphism and tears down with a
histomorphism. Useful for lexical scoping.
- dyna : Functor f =>
(f (Cofree f
a) ->
a) ->
(b ->
f b) ->
b ->
a
A dynamorphism without a natural transformation in between.
- coelgot : Functor f =>
((a,
f b) ->
b) ->
(a ->
f a) ->
a ->
b
Elgot coalgebra
- (.*) : (c ->
d) ->
(a ->
b ->
c) ->
a ->
b ->
d
- Fixity
- Left associative, precedence 9