title: Lisp reversing all continuous sequences of elements
body: <p>I want to reverse only the continuous sequences, not all the elements of my original list.</p>
  
  <pre><code> Ex:
      (reverseC '( 1 2 ( 4 5 ) 5 ) ) =&gt; ( 2 1 ( 5 4 ) 5 )
      (reverseC '(1 4 2 (3 4) 9 6 (7 8)))) =&gt; (2 4 1 (4 3) 6 9 (8 7))
  </code></pre>
  
  <p>I was thinking of splitting it into 2 functions: one to reverse a simple list ( 1 2 3 ) -> ( 3 2 1 ) and one function 
  (main) to determine the continuous sequences, make a list out of them, apply reverse on that list and the remake the whole reversed list.</p>
  
  <pre><code>(defun reverse-list ( lista ) 
      (if (eql lista () )
          ()
          (append (reverse-list (cdr lista )) (list ( car lista)))
      )
  )
  </code></pre>
  
  <p>This is the reverse function but I have no idea how to do the other one. I'm new to Lisp and I come from Prolog so it's a pretty big change of scenery. Any idea is welcome.</p>
  
  <pre><code>(defun reverse-more (L)
      (if (eql L nil)
          nil
          (let ( el (car L)) (aux (cdr L)))
          (if (eql (listp el) nil)
       ...No idea on the rest of the code ...
  </code></pre>