[Haskell-beginners] recursive 'let' ?

John M. Dlugosz ngnr63q02 at sneakemail.com
Fri Apr 11 00:12:25 UTC 2014


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 see that makes sense in light of lazy evaluation: b is really an alias for a (recursive) 
function, not a value that needs to find fixed points.

Is this used for common idioms and problem-solving approaches in Haskell?

--John



More information about the Beginners mailing list