[Haskell-cafe] Any ideas for "->" (function type) in a simply-typed lambda calculus version of Brett Victor's Alligator Eggs game?

Benjamin L. Russell dekudekuplex at yahoo.com
Wed Mar 19 03:48:46 EDT 2008


Brett Victor has invented an Alligator Eggs game (very
loosely resembling Conway's Game of Life), using
formal rules to determine feeding and breeding
patterns for alligators and their eggs, but the game
represents the *untyped* lambda calculus:

Alligator Eggs!
http://worrydream.com/AlligatorEggs/

I am interested in adapting this to the *simply typed*
lambda calculus with Curry-style typing, to aid
students of Haskell.  Brett Victor's game currently
aids students of LISP, and I think that it would be
helpful to have a Haskell counterpart (see
http://wadler.blogspot.com/2007/05/oh-no-alligators.html
for a comment on how the Alligator Eggs game has been
used by EE students at Caltech in learning LISP):

Simply typed lambda calculus - Wikipedia, the free
encyclopedia
http://en.wikipedia.org/wiki/Simply_typed_lambda_calculus

Thereafter, I would like to create a new entry for
this Haskell version of Alligator Eggs on HaskellWiki,
and create a link to it under a new subsection, "Board
Games," under the current "Learning Haskell" category:

http://www.haskell.org/haskellwiki/Learning_Haskell

In Brett Victor's version, the following
representations hold:

* a hungry alligator:  lambda abstraction
* an old alligator:  a pair of parentheses
* an egg:  a variable
* the Eating Rule:  beta-reduction
* the Color Rule:  (over-cautious) alpha-conversion
* the Old Age Rule:  the rule that a pair of
parentheses containing a single term may be removed

However, in thinking about how to adapt the game, I am
not quite sure how to incorporate the representation
of "->" (function type):

* ???:  "->" (function type)

What ideas, if any, would anybody have on how "->"
(function type) could be represented in a simply-typed
lambda calculus version of Brett Victor's Alligator
Eggs?

Benjamin L. Russell


More information about the Haskell-Cafe mailing list