title: length of list at racket
body: <p>I was trying to figure out getting the length of the list</p>
  
  <p>but failed to do so </p>
  
  <p>showing </p>
  
  <pre><code> expected: number?
    given: #&lt;procedure:list&gt;
    argument position: 1st
    other arguments...:
  </code></pre>
  
  <p><strong>my code</strong>:</p>
  
  <pre><code>(define (length len)
  
    (list '(1 2 3 4 5 6 7))
    (if (= list null)
       (len)
       (cdr list)
       )
    (+ len 1)
    (length)
    )
  
  
  (length 0)
  </code></pre>
  
  <p>What I was intending to do is </p>
  
  <ol>
  <li>get the list(which is inside it, because cannot figure out how to
  get list...)</li>
  <li>make 'if' function so that it can <code>printf len</code> if the (cdr list)
  become null</li>
  </ol>
  
  <p>if you guys have any errors  just let me know, please</p>
  
  <p>I was trying to study Racket about a 2 weeks ago and couldn't figure out how to do it...</p>
  
  <p>thanks!</p>