title: Racket begin form
body: <pre><code>(define mystery2 
    (lambda (L)
      (if (null? L)
          L
          (begin
            (displayln L)
            (append (mystery2 (cdr L))
                    (list (car L)))))))
  </code></pre>
  
  <p>and I run it by <code>(mystery2 '((1 2) (3 4) 5 6))</code></p>
  
  <p>Here, I am not sure what "begin" function does. </p>
  
  <p>Also, when I write "displayln L" it only gives us <code>((1 2) (3 4) 5 6))</code>. <strong>Shouldn't it print out decreasing values since it is a recursion?</strong> </p>
  
  <p>Please, help me understand why "begin" is used here and displayln works like that.</p>
  
  <p>There is no problem in the code itself.</p>