title: In Scheme, how do you use lambda to create a recursive function?
body: <p>I'm in a Scheme class and I was curious about writing a recursive function without using define. The main problem, of course, is that you cannot call a function within itself if it doesn't have a name.</p>
  
  <p>I did find this example: It's a factorial generator using only lambda.</p>
  
  <pre><code>((lambda (x) (x x))
   (lambda (fact-gen)
     (lambda (n)
       (if (zero? n)
           1
           (* n ((fact-gen fact-gen) (sub1 n)))))))
  </code></pre>
  
  <p>But I can't even make sense of the first call, (lambda (x) (x x)): What exactly does that do? And where do you input the value you want to get the factorial of?</p>
  
  <p>This is not for the class, this is just out of curiosity.</p>