SOLSTICE! Pathological Cases, Free Algebras
That's right girls and boys, it's the SOLSTICE! It doesn't get any darker than this, the SUN is RETURNING!
For my own entertainment I tracked down a formula to estimate the amount of sunlight I get in these parts.
With latitude 65.8003 and longitude 21.704, and a formula from Dr. Math, I get
I like trying custom settings for sgt-puzzles. Here we see a screenshot of untangle with one thousand nodes.
Derek Elkins made another insightful comment on Lambda the Ultimate. This is something I immediately understand, but cannot explain.
Maybe after I read the linked papers. As Derek said, "Monads for Free algebras." Now I have to learn what those are, and what use they have. [1] My intuitive understanding is that certain mathematical structures dovetail perfectly with monads.
Since I am familiar with monads, I can clearly see how the code below elegantly describes certain conventions used in Haskell. The real question is, once I understand Free Algebras, where else does Haskell mesh perfectly with universal algebra?
dataFreeMonadsiga=Returna|Expr(sig(FreeMonadsiga))foldFMretexpr(Returna)=retafoldFMretexpr(Expre)=expr(fmap(foldFMretexpr)e)instanceFunctorsig=>Functor(FreeMonadsig)wherefmapf=foldFM(Return.f)ExprinstanceFunctorsig=>Monad(FreeMonadsig)wherereturn=Returnfm>>=f=foldFMfExprfm-- examples-- Maybe isdataMaybeSigx=Nothing-- Tree (NonDet) isdataNonDetSigx=Fail|Ambxx-- Either s isdataEitherSigsx=Errors
[1] Wikipedia has the wrong Free Algebras, Cale Gibbard suggests reading the math atlas and purchasing MacLane's "Categories for the Working Mathematician."