Re: :test #'something-specific



"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/
.



Relevant Pages

  • April 1
    ... Why does Friday, April 1, 2005 in a date formated cell generate a wrong data ... type error when using the WEEKDAY formula? ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: [9fans] MS Research reinvents Inferno?
    ... And you can't bind '#p' onto /dev because you'll get ... a type error. ... Russ ... Prev by Date: ...
    (comp.os.plan9)
  • Re: type error on porting outfile.write
    ... > application platform, I found a "type error" ... > on a fileout statement: ... Prev by Date: ...
    (comp.lang.python)
  • Re: nested list
    ... but it said that "512 Type Error: ... Prev by Date: ...
    (comp.lang.prolog)