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

Assistant 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:



  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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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