[Haskell-cafe] where versus let

Scott Turner p.turner at computer.org
Fri May 6 12:04:00 EDT 2005


On 2005 May 06 Friday 11:17, Scott J. wrote:
>  (S f ) >>= g  = S(\s -> (b,s2)
>                                    where (a,s1)  = f s
>                                              S fun   = g a
>                                              (b,s2)  = fun s1  )
>
> However the compiler does not accept this use of "where".

Haskell's 'where' is part of declaration syntax, while 'let' forms an 
expression.


More information about the Haskell-Cafe mailing list