<font face="'Helvetica Neue', 'Helvetica Neue', Helvetica, Arial, sans-serif"><span style=" font-size:14px; font-family:'Helvetica Neue', 'Helvetica Neue', Helvetica, Arial, sans-serif;">Additionally, since let is “let recâ€, it can’t be translated into a lambda expression using that method in all cases, e.g.<div><br></div><div>let f x = g x</div><div> g x = 1</div><div>in f 2</div><div><br></div><div>==></div><div><br></div><div>(\f -> (\g -> f 2)) (\x -> g x) (\x -> 1)</div><div><br></div><div>In the lambda expression, the second g is free, whereas the corresponding g in Haskell is bound.</div><div><br></div><div>–<div>Kyle Marek-Spartz</div><div> </div><div> </div><div> </div><div id="replyBeginsHere"><div> </div><div> </div><div> </div>On Sep 23, 2014, 8:01:29 AM, Barak A. Pearlmutter <barak@cs.nuim.ie> wrote:<hr><div class="linkMe"><br>On Mon, 22 Sep 2014 19:30:33 -0400, Michael Orlitzky wrote:<br><br>> It's hard to tell from your example, but if you want, you can<br>> translate the let binding directly to lambda calculus and then go from<br>> there where the rules are simple.<br>> <br>> In Haskell,<br>> <br>> let <name> = <argument> in <expression><br>> <br>> translates to,<br>> <br>> (<name> -> <expression>) <argument><br><br>Although this list might not be for homework problems, there is an<br>element of terminological confusion and a quest for nomenclature in the<br>question that don't seem entirely unreasonable. Even if we're not going<br>to answer the question per se, we shouldn't give hints that are<br>misleading, or true in Scheme and lambda calculus but false in Haskell.<br><br>$ ghci<br><br>Prelude> let b = 3:b in take 3 b<br>[3,3,3]<br><br>Prelude> ( -> take 3 b) (3:b)<br><interactive>:3:21: Not in scope: `b'<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org" target="_blank">mailto:Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a> </interactive></argument></expression></name></expression></argument></name></div><br><br></div></div></span></font>