[Haskell-cafe] YAWQ (Yet Another Wash Question)
John Goerzen
jgoerzen at complete.org
Thu Feb 24 13:57:08 EST 2005
On Thu, Feb 24, 2005 at 05:53:29PM +0000, Jules Bean wrote:
> >>Well, how could this possibly work (that is, how could 'x' be visible
> >>at the point of submission)? If you go down the 'else' branch, what
> >>value should x have?
> >
> >I'm assuming I would have two different calls to submit, one for the
> >case where cond is true (that includes x), and one for the case where
> >cond is false (that omits it).
>
> Well saying that makes me think that the submit itself should be in the
> branches of the if ... then ... else ...
Possible, but ugly. I have about 50 lines of code that has to go
in-between, so I'd be duplicating it. And, if I tried to make it into
just another function, I'd have the same problem, I believe (scoping)
More information about the Haskell-Cafe
mailing list