max-by ( obj1 obj2 quot: ( obj -- n ) -- obj1/obj2 )


Vocabulary
math.compare

Inputs
obj1an object
obj2an object
quota quotation with stack effect ( obj -- n )


Outputs
obj1/obj2an object


Definition


: max-by ( obj1 obj2 quot: ( obj -- n ) -- obj1/obj2 )
[ bi@ dupd max = ] curry most ; inline