I would just do this:
let map = (order, getter) => (self, other) => order(getter(self), getter(other))
I’d be cautious about using ==
for make, why not using the properties of ordering instead as I did in the playground instead?
I would just do this:
let map = (order, getter) => (self, other) => order(getter(self), getter(other))
I’d be cautious about using ==
for make, why not using the properties of ordering instead as I did in the playground instead?