[Haskell-cafe] Any ideas for "->" (function type) in a
simply-typed lambda calculus version of Brett Victor's
Alligator Eggs game?
Justin Bailey
jgbailey at gmail.com
Thu Mar 20 10:58:47 EDT 2008
On Wed, Mar 19, 2008 at 12:48 AM, Benjamin L. Russell
<dekudekuplex at yahoo.com> wrote:
> 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?
Since color is already taken, how about representing types as skinny
and fat alligators? Functions can then be represented by alligators
with their tails joined together. For example, Nat -> Bool would be
represented as a skinny alligator joined to a fat alligator. A skinny
alligator will only eat anotehr skinny alligator, and then goes to
take a nap (i.e. disappears). That leaves the fat alligator (bool).
Just a sketch but maybe it will help you out!
Justin
More information about the Haskell-Cafe
mailing list