[Haskell-cafe] Simple Table Update

Paul Keir pkeir at dcs.gla.ac.uk
Thu Oct 9 04:26:11 EDT 2008

Yes, it doesn't do anything yet (apart from update a currently discarded
accumulator (symbol table)).

-----Original Message-----
From: Ryan Ingram [mailto:ryani.spam at gmail.com] 
Sent: 09 October 2008 09:06
To: Paul Keir
Cc: haskell-cafe at haskell.org
Subject: Re: [Haskell-cafe] Simple Table Update

On Wed, Oct 8, 2008 at 9:12 PM, Paul Keir <pkeir at dcs.gla.ac.uk> wrote:
> It brings tears to my eyes to see such a beautiful function ;) You've
> the nail on the head Ryan. The new version of my second previous code
> snippet now no longer requires "fixpu*", and is:
> typeCheckAST (Program pus) = Program $ snd $ mapAccumL f [] pus
>   where f st pu = (st ++ [("",[])],pu)

I'm confused about this.  If I'm reading this correctly,

    snd $ mapAccumL f (undefined) pus == map id pus == pus

  -- ryan

More information about the Haskell-Cafe mailing list