Hacker News new | ask | show | jobs
by antiismist 6305 days ago
Instead of declaring a local function, you can use let (http://docs.plt-scheme.org/reference/let.html)

e.g.:

  > (let fac ([n 10])
      (if (zero? n)
          1
          (* n (fac (sub1 n)))))

  3628800
1 comments

Yes, "named let" is lovely, but perhaps less obvious for the non-cognoscenti. It also doesn't translate into Python, etc.