Initially, I had written
hackage-fetch to see if there was
any use of
coelgot
anywhere on Hackage. At the time, there was not, but this has changed due
to my gmpint
package. As of
writing, it is not surprisingly the only use of co-(Elgot algebra)s on the entirety of Hackage.
Inspired by a tweet, I decided to write an Old English name generator in Madlang. This would help my indecision (picking a favorite color is hard!), and it would unearth some limitations of Madlang.
You may have seen my post on co-(Elgot algebras),
in which I mentioned I had been using some exotic recursion schemes for my
gmpint
package. I came across a similar example, this time for Mendler-style
recursion schemes. To my knowledge, it is the only published example of
a Mendler-style catamorphism.
Suppose we wish to convert a number to its base \( b \) representation. GMP uses arrays of limbs to represent large integers; we need to tease out its base \( 2 ^{64} \) representation.
I've talked about polyglot ATS/Haskell builds previously, but I wanted to show off the results of all this work without so much didactic focus.
prev | next