In the package cl-cont, file src/special-transformers.lisp, duplicates-
p is implemented this way:

(defun duplicates-p (sequence &key (key #'identity) (test #'eql))
  "Returns true if there are duplicate elements in the sequence, false
  otherwise."
  (eq (length sequence) (length (remove-duplicates sequence :key
key :test test))))

The documentation and it's name don't match it's results. For example:

cl-user> (duplicates-p '(1 1))
nil

It should be implemented this way instead:

(defun duplicates-p (sequence &key (key #'identity) (test #'eql))
  "Returns true if there are duplicate elements in the sequence, false
  otherwise."
  (not (eq (length sequence) (length (remove-duplicates sequence :key
key :test test)))))

This seems pretty strange to me. Hasn't anyone ever seen it? It is
used in tagbody's CPS transformer.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to