# Comparator that use a function provided by the user to compare between elements.
class ComparatorWith[E]
super Comparator
redef type COMPARED: E
var f: Fun1[E, Comparable]
redef fun compare(a,b)
do
var x = f.call(a)
var y = f.call(b)
if x < y then return -1
if x > y then return 1
return 0
end
end
lib/functional/iter_extras.nit:393,1--408,3