Re: bug: min on strings

Ralf Juengling <[email protected]> Thu, 25 Oct 2007 08:30:01 -0700 (PDT)
Newsgroups gmane.lisp.lush.devel
Message-ID <[email protected]>
Ah, I thought I had tried min of only strings.

I looked at the code and min is actually more general
than the documentation indicates. It gives you the
min of any set of objects that can (pair-wise) be
compared:

? (setq d1 (now))
= ::DATE:year-second:(2007-10-25 08:27:27)
? (setq d2 (now))
= ::DATE:year-second:(2007-10-25 08:27:32)
?
? (min d1 d2)
= ::DATE:year-second:(2007-10-25 08:27:27)
?

Ralf



On Wed, 24 Oct 2007, Yann LeCun wrote:

> Well, perhaps it's a misinterpretation on your part caused by an
> ambiguity in the documentation: The arguments have to be all numbers or
> all strings. i.e., min can compare numbers to numbers and strings to
> strings, but not numbers to strings, hence:
>
> ? (min "asd" "qwe")
> = "asd"
>
>  -- Yann
>
> On Wednesday 24 October 2007, Ralf Juengling wrote:
>> another documentation bug, I guess:
>>
>>
>> (min <l1> ... <ln>)                           [DX]
>> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
>>
>> Return the minimum element within l1 ... ln . Arguments li may be
>> numbers or strings.
>>
>> Example:
>> ? (min 2 3 (* 3 3) (+ 4 3))
>> = 2
>>
>>
>> = ()
>>
>>
>> ? (min 2 3 "4")
>>
>> *** min : Cannot rank these objects
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Lush-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/lush-devel
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Lush-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lush-devel
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/