 
 (defun mode/show ()
   "  Returns all modes associated with files
-    
+
      To query the file extesions associated with a mode
-     use: 
+     use:
          > (mode/ftypes 'markdown-mode)
-  
+
      for example.
   "
-  (dolist (m (remove-if #'listp
-    (mapcar #'cdr auto-mode-alist))) (print m)))
+  (for-each #'print
+	    (unique (reject #'listp (map #'cdr auto-mode-alist)))))
+
 
 (defun mode/ftypes (mode)
   "
-  Get all file extension associated with a mode. 
-  
+  Get all file extension associated with a mode.
+
   Usage:
-  
+
   ELISP> (get-mode-ftypes 'markdown-mode)
   ((\"\\.md\\'\" . markdown-mode)
   (\"\\.text\\'\" . markdown-mode)
-  (\"\\.markdown\\'\" . markdown-mode)  
-  
+  (\"\\.markdown\\'\" . markdown-mode)
+
   "
   (remove-if-not
    (lambda (al)

;; Scheme for-each function.
;;
(defun for-each (fun xs)
  (if (null xs)
      nil
    (progn
      (funcall fun (car xs))
      (for-each fun (cdr xs)))))

(defun for-each-appply (fun xss)
  (for-each (lambda (xs) (apply fun xs))  xss))

(defun filter (fun xs)
  (if (null xs)
      '()
    (let ((hd (car xs))
          (tl (cdr xs)))
      (if (funcall fun hd)
          (cons hd (filter fun tl))
        (filter fun tl)))))

(defun reject (fun xs)
  (if (null xs)
      '()
    (let ((hd (car xs))
          (tl (cdr xs)))
      (if (not (funcall fun hd))
          (cons hd (reject fun tl))
        (reject fun tl)))))

(defun take (n xs)
  (if (or (null xs) (zerop n))

    (let ((hd (car lst))
      (tl (cdr lst)))
      (if (equal targ hd)
      (cons subst (replace_sym targ subst tl))
    (cons (if (listp hd) (replace_sym targ subst hd) hd)
          (replace_sym targ subst tl))))))

