a chicken monad

Yesterday, Mark Dominus took a picture of me eating a monad:

Brent eating a monad

It was a delicious Chicken monad.

data Chicken a = Chicken (Egg a)
data Egg a = Egg (Chicken a)

instance Monad Chicken where
  ...(exercise for the reader)

About Brent

Associate Professor of Computer Science at Hendrix College. Functional programmer, mathematician, teacher, pianist, follower of Jesus.
This entry was posted in humor, meta and tagged , . Bookmark the permalink.

3 Responses to a chicken monad

  1. Shae Erisson says:

    One of them can be a newtype (says Edward Kmett over my shoulder). You just have to choose which one you want to come first.

  2. Lally Singh says:

    s/Chicken/Chips/
    s/Egg/Cheese/

    http://xkcd.com/140/

  3. lilac says:

    Clearly, neither came first:

    > newtype Chicken = Chicken Egg deriving Show
    > newtype Egg = Egg Chicken deriving Show
    > undefined :: Chicken
    Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (Chicken (Egg (**STACK OVERFLOW**

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.