Puzzle

Matt Harden matth@mindspring.com
Mon, 25 Aug 2003 22:54:13 -0500


On Friday 22 August 2003 04:29 pm, Ralf Hinze wrote:
> | Seeing as its thst time of year again and everyone is posting their
> | homework, has anyone got any good puzzles to do?
> | I wouldn't mind having a go at something a bit tricky.
>
> Here is another one: figure out what `unknown' is.
>
> > unknown                       =  mysterious unknown
> >
> > mysterious ks                 =  0 : weird ks
> > weird (k : ks)                =  (k + 1) : mysterious ks


Cool!  That leads me to this contraption:

> tricky                        = 0 : enigma tricky tricky
> enigma (k : ks)               = (k :) . labyrinth (enigma ks)
> labyrinth f (k : _ : ks)      = (k + 1) : f ks

Figure out what `tricky' is, and what its relationship is to `unknown'.

Enjoy!

Matt Harden