[Haskell-beginners] recursive 'let' ?

Karl Voelker karl at karlv.net
Fri Apr 11 06:50:19 UTC 2014


On Thu, Apr 10, 2014, at 05:12 PM, John M. Dlugosz wrote:
> I understand that the definitions introduced by 'let' can be recursive,
> even mutually 
> recursive among several names.  Why would you want to do that?  I saw
> contrived examples, 
> and wonder why the authors never show a realistic example.
> 
> 	let b = f a c
> 	    c = f a b
> 	in ...

I am a bit confused by your question.

I assume you know about the usefulness of recursion in general, and that
your question is only about recursion in the context of a let-binding.
But it seems to me that there is nothing particularly special about the
let-binding context, as compared to, for example, the top level of a
module. So what seems different about it to you?

Your code snippet makes me think that perhaps you are specifically
interested in definitions of non-function values. Is that so?

-Karl


More information about the Beginners mailing list