'leftmost' or 'rightmost'? Or 'find-leftmost' 'find-rightmost'? I dunno, maybe those are more confusing. They seem to hint at the right idea to me (at least as it relates to argument order and the relation).
On Sun, Oct 11, 2015, 6:25 PM Alex Knauth <alexan...@knauth.org> wrote: > Hi, > > Alexis King and I were discussing adding versions of argmin and argmax to > the alexis/collection library, but we agreed that find-min and find-max > were clearer names. Then we came up with a generalization of those that > would take an ordering procedure (< for find-min and > for find-max), and > find the element that had a property greater/less than the properties of > all the other elements, by the ordering procedure (not restricted to > numbers). > > The problem was naming it. We thought of `find-best` and > `find-most-relevant`, but `find-best` would be confusing when it's being > used to find the worst case, and `find-most-relevant` seems better but to > wordy. > > Do any of you have any ideas? > > Examples: > > (the-function < first '((3 pears) (1 banana) (2 apples))) ; find-min > would be a shorthand for this > '(1 banana) > > (the-function > first '((3 pears) (1 banana) (2 apples))) ; find-max > would be a shorthand for this > '(3 pears) > > (the-function string<? (compose1 symbol->string second) '((3 pears) (1 > banana) (2 apples))) > '(2 apples) > > (the-function string>? (compose1 symbol->string second) '((3 pears) (1 > > banana) > (2 apples))) > '(3 pears) > > *https://github.com/lexi-lambda/racket-alexis-collections/pull/9#issuecomment-145727937 > <https://github.com/lexi-lambda/racket-alexis-collections/pull/9#issuecomment-145727937>* > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.