title: Largest sublist in Common Lisp
body: <p>I'm trying to get the largest sublist from a list using Common Lisp.</p>
  
  <pre><code>(defun maxlist (list)
  (setq maxlen (loop for x in list maximize (list-length x)))
  (loop for x in list (when (equalp maxlen (list-length x)) (return-from maxlist x)))
  )
  </code></pre>
  
  <p>The idea is to iterate through the list twice: the first loop gets the size of the largest sublist and the second one retrieves the required list. But for some reason I keep getting an error in the <code>return-from</code> line. What am I missing? </p>