
1 Mar
2009
1 Mar
'09
4:17 a.m.
On Sat, Feb 28, 2009 at 01:01:56PM -0500, Brent Yorgey wrote:
On Sat, Feb 28, 2009 at 05:19:03PM +0000, Will Ness wrote:
writes: Is there any non-recursive binding expression in Haskell?
Assignment in Haskell is not destructive update.
I am not asking for assignment. What I want is indeed what I already said: a new lexical scope which introduces a new variable, but the variable name is being reused. That shadows the previous definition.
Romildo
The code I posted has exactly these semantics: When we write test = head $ do xs <- [ [] ] xs <- [ 3:xs ] xs <- [ 8:xs ] xs <- [ 7:xs ] return xs each xs in a singleton generator refers to its previous binding.