What is the difference between Fix, Mu and Nu in Ed Kmett’s recursion scheme package

Mu represents a recursive type as its fold, and Nu represents it as its unfold. In Haskell, these are isomorphic, and are different ways to represent the same type. If you pretend that Haskell doesn’t have arbitrary recursion, the distinction between these types becomes more interesting: Mu f is the least (initial) fixed point of … Read more

Histomorphisms, Zygomorphisms and Futumorphisms specialised to lists

Zygomorphism is the high-falutin’ mathsy name we give to folds built from two semi-mutually recursive functions. I’ll give an example. Imagine a function pm :: [Int] -> Int (for plus-minus) which intersperses + and – alternately through a list of numbers, such that pm [v,w,x,y,z] = v – (w + (x – (y + z))). … Read more

Recursion schemes for dummies?

Extremely loosely speaking, a catamorphism is just a slight generalization of fold, and an anamorphism is a slight generalization of unfold. (And a hylomorphism is just an unfold followed by a fold.). They’re presented in a more rigorous form usually, to make the connection to category theory clearer. The denser form lets us distinguish data … Read more

What does “coalgebra” mean in the context of programming?

Algebras I think the place to start would be to understand the idea of an algebra. This is just a generalization of algebraic structures like groups, rings, monoids and so on. Most of the time, these things are introduced in terms of sets, but since we’re among friends, I’ll talk about Haskell types instead. (I … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)