Re: :test #'something-specific
- From: Peter Seibel <peter@xxxxxxxxxxxxxxx>
- Date: Sun, 22 Jan 2006 17:29:24 GMT
"Carl Taylor" <carltaylor@xxxxxxx> writes:
> Is there any advantage to adding a specific :test argument when it's
> not really needed? For example:
>
> (delete-duplicates "ABBBBFFGEEEADCBACC" :test #'char=)
> versus
> (delete-duplicates "ABBBBFFGEEEADCBACC")
Well, if this was, as it presumably would be:
(delete-duplicates some-var :test #'char=)
vs
(delete-duplicates some-var)
The former will error if any of the elements of the sequence are not
characters. Which might be considered a feature if you want to detect
the type error earlier and a bug if you want this call to be more
forgiving.
-Peter
--
Peter Seibel * peter@xxxxxxxxxxxxxxx
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp * http://www.gigamonkeys.com/book/
.
- References:
- :test #'something-specific
- From: Carl Taylor
- :test #'something-specific
- Prev by Date: Re: PCL in the Jolt Awards finals!
- Next by Date: Re: PCL in the Jolt Awards finals!
- Previous by thread: Re: :test #'something-specific
- Next by thread: Is it possible to define a function w/in a macro as (defun some-fn-name-,param)?
- Index(es):
Relevant Pages
|