Paste: clean list

Author: kenanb
Mode: lisp
Date: Fri, 20 Jan 2012 23:54:57
Plain Text |
(defun clean-noise (list min test) 
  (labels ((remove-unique (stack noiseless min test)
	     (if (cdr stack) 
		 (remove-unique (cdr stack)
				(if (<= min (count (car stack) 
						   noiseless
						   :test test)) 
				    noiseless 
				    (remove (car stack) noiseless)) min test) 
		 noiseless)))
    (remove-unique (remove-duplicates list) list min test)))

New Annotation

Summary:
Author:
Mode:
Body: