Doesn't 'min' imply/require the usage of '<' ? A whole lot of methods would need the extra argument added for consistency, including min, minimum, maximum, etc...
Could a workable solution be to define a function that maps a tuple to a real number instead of a comparison function and do 'findmin(map(score_func, my_tuples))' ? On Tuesday, December 1, 2015 at 12:20:53 PM UTC-5, Júlio Hoffimann wrote: > > The issue on GitHub: https://github.com/JuliaLang/julia/issues/14216 > > Thanks, > -Júlio > > 2015-12-01 8:57 GMT-08:00 Dan <[email protected] <javascript:>>: > >> suggestion: call the named argument `lt` to match the argument of `sort`. >> >> >> On Tuesday, December 1, 2015 at 6:23:07 PM UTC+2, Júlio Hoffimann wrote: >>> >>> Hi Erik, >>> >>> What I meant was a derived type from Julia's Tuple type. Though I agree >>> with you that this may be too much of an overhead for such a simple task. >>> >>> I'll open an issue on GitHub to ask if others are ok with an additional >>> predicate option a la C++: >>> >>> findmin(array, pred=<) >>> >>> If they are all positive, I'll add it for you. >>> >>> Best, >>> -Júlio >>> >> >
