cnuernber / dtype-next

A Clojure library designed to aid in the implementation of high performance algorithms and systems.
Other
319 stars 18 forks source link

universal comparator #103

Open genmeblog opened 1 week ago

genmeblog commented 1 week ago

After fixing #99 some regression was introduced in tablecloth regarding comparison of any type. Till the last version, the following code was working. < or > could be treated as an universal comparator.

(tech.v3.datatype.argops/argsort tech.v3.datatype.functional/< ["ab" "bc"])
;; => [0 1]

Is it possible to make a comparator which acts universally on every type or should I reach for Clojure comparator?

genmeblog commented 1 week ago

https://clojurians.zulipchat.com/#narrow/stream/236259-tech.2Eml.2Edataset.2Edev/topic/sorting.20string.20-.20regression.20in.207.2E030