noir-clojure / lib-noir

A set of libraries for ring apps, including stateful sessions.
Eclipse Public License 1.0
481 stars 47 forks source link

`less-than?` is the same as `greather-than?` #53

Closed fgallina closed 11 years ago

fgallina commented 11 years ago

The logic for these two validation functions is exactly the same, making less-than? to behave contrary to what's expected.

Here is a simple proposed fix:

(def less-than? (complement greather-than?))
yogthos commented 11 years ago

that's a good catch, changed less-than? to return (not (greater-than? n v))

yogthos commented 11 years ago

released a new version of the lib with the fix

fgallina commented 11 years ago

That's exactly what complement does, the fix is good in any case. Thanks!

Raynes commented 11 years ago

defn adds metadata that def does not add that is in some cases useful. I support the way yogthos did it.

yogthos commented 11 years ago

w00t :)