I’ve just submitted a Functional Pearl to ICFP explaining combinatorial species in a way that is (hopefully) accessible and interesting to functional programmers. You can read the draft here — as always, comments, suggestions, etc. are welcome (although it’s too late to help my ICFP chances =).

I plan to upload a new version of my species library soon with a ton of major improvements (unlabelled enumeration, and automatically deriving species corresponding to user-defined data types via Template Haskell, to name a couple). When I do I’ll be sure to write about it here!

Also, the paper doesn’t mention it, but all the diagrams in the paper were of course generated with diagrams.

3 Responses to Functional pearl on combinatorial species

I don’t understand why fmap and enumerate for Zero must be undefined. Couldn’t you have fmap _ = id and enumerate _ = [] ? The fmap seems to be mostly philosophical, since you’ll never find anything to apply it to, but don’t you need to define enumerate in order to use Zero in sums?