[Haskell-beginners] recursive 'let' ?
nrujac at gmail.com
Mon Apr 14 20:04:32 UTC 2014
That's classic mutual recursion. In your example, the values of b and c
depend entirely on f. For example what if
f = const a
Now b and c are obviously a and its not ambiguous. Similarly, mutually
recursive functions can compute values for b and c.
Do you have a similar issue with a definition like:
b = f a b
or is that fine? If so, why? If not, why not?
On Mon, Apr 14, 2014 at 11:24 AM, John M. Dlugosz
<ngnr63q02 at sneakemail.com>wrote:
> I don't mind recursive *functions*. It's recursive definition of single
> computed values that looked odd to me. Lazy evaluation makes all the
> difference. Looking at
> b= f a c
> c = f a b
> I was thinking, "how can it figure out what b and c need to be?" because
> I'm used to this meaning that it needs to come up with an actual value
> right now.
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners