Saluton! * Kurt M. Dresner; 2003-07-19, 11:33 UTC: > When I learned python I was overjoyed that I could evaluate 1 < 2 < > 3 and get "true". I just realized that you can't do that in Ruby. > Is there a reason why? a < b and b < c imply a < c. But what if you want to evaluate a < b > c? Which conditons do you require to be met? (1) a < b, b > c and a < c (2) a < b, b > c and a > c (3) a < b, b > c and nothing more Some examples: 2 < 3 > 1 -> (2), (3) 1 < 3 > 2 -> (1), (3) 2 < 3 > 2 -> (3) It seems to be better *not* to use '<' and the like. Better use methods that can be applied to an arbitrary number of elements: def increasing(*list) return true if list.length < 2 y = nil list.each {|x| return false unless y.nil? or y < x y = x } true end Gis, Josef 'Jupp' Schugt -- N'attribuez jamais la malice ce que l'incompñÕence explique ! -- NapolñÐn