[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arg-order of test-fn for #'position



> I need to find the position of the first item in a list of numbers
> that is smaller than a given number. I thought it might be possible 
> to use the position-function for this purpose, using it that way:
> 
> (position given-number list-of-numbers :test #'>)
> 
> This of course works only if given-number is the first arg and 
> the item in list-of-numbers is the second arg passed to the 
> test-function (which is true for MCL). My question is: Is this true 
> for all CL implementations, or is the ordering of arguments passed 
> to the test-function implementation-dependent?

This is portable (up to bugs, of course).

See the dpANS glossary entry for "satisfies the test" (or CLtL2 p.391).