by<A, B> static method

Order<A> by<A, B>(
  1. B f(
    1. A a
    ),
  2. Order<B> ord
)
override

Convert an implicit Order<B> to an Order<A> using the given function f.

Implementation

static Order<A> by<A, B>(B Function(A a) f, Order<B> ord) =>
    _Order((x, y) => ord.compare(f(x), f(y)));