Arc Forumnew | comments | leaders | submitlogin
1 point by map 6122 days ago | link | parent

For the record, here's an improved version translated from someone else's CL code:

  (def collect-dups (lst)
    (let accum nil
      (each e lst
        (if (is caar.accum e)
          (push e car.accum)
          (push list.e accum)))
      (rev (keep cdr accum))))