3 ms·
Regarding "<" i love the way clojure solved this. It made (< ....) a vararg function that returns true if arguments are in strictly ascending order. And analogi
by ajuc 9y ago
Regarding "<" i love the way clojure solved this. It made (< ....) a vararg function that returns true if arguments are in strictly ascending order. And analogically other binary comparison operators.
It's very useful, for two arguments it works just like x < y, and it makes you think about (< x y) as "in rising order: x and y"
- kgwgk 9y agoClojure solved this in the way it has been done for decades :-)
- zeveb 9y agoLisps have been doing this since at least Common Lisp (c.f. http://www.lispworks.com/documentation/HyperSpec/Body/f_eq_sle.htm#LT http://www.lispworks.com/documentation/HyperSpec/Body/f_eq_s...), and probably a lot longer than that. It's the natural way to do it!