title: Building a List in LISP from the atoms of another list
body: <p>Define  the function 'mapping' that takes 2 arguments: a SIMPLE list L, and an integer value val. Every element of the list L is a  list of two atoms – key and object. The function returns a list of  objects whose key is less than val.</p>
  
  <p>Example:
  (mapping '((12 k) (7 n) (23 r) (9 p)) 13) --> (k n p)</p>
  
  <p>My Code So Far:</p>
  
  <pre><code>(defun mapping (list val)
      (if (consp list)  ;;if list is not empty
          (if (&gt; val (caar list)) ;; check the first value in the first nested list
              (cons (car(cdr list)));;if value is greater add that value to the return list
  
      (mapping (cdr list) val)))) ;; recurse thru the list
  </code></pre>
  
  <p>My code has syntax erros  as well as the cons statement is not returning the list of all the values of how i expect it.</p>