Add tags

Add tags to the following comment
(print (uniq '(3 1 4 1 5 9 2 6 5 3 5 8 9 7 9)))
;他の人たちのコードを見てると勉強になります。
1
2
3
4
5
6
7
8
(defun uniq (lst)
  (labels ((rec (l acc)
              (if (null l) (reverse acc)
                (let ((top (car l)) (rests (cdr l)))
                  (if (member top acc)
                    (rec rests acc)
                    (rec rests (cons top acc)))))))
    (rec lst nil)))

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...