From: Marcin 'Qrczak' Kowalczyk Date: 2003-09-17T21:37:40+09:00 Subject: Re: Changing ==,>,<, etc Dnia czw 31. lipca 2003 22:03, Martin DeMello napisa�: > any? and all? are very receiver-centric - compare > > a.any? {|i| b.all? {|j| i < j} } > > with > > any(a) < all(b) > > The latter shows up the symmetry a lot more clearly - I've always hated > having to write nested loops to express something flat. But there is no symmetry. Does it mean that there exists something in "a" such that it's smaller than everything in "b", or that for everything in "b" there exists a smaller thing in "a"? Well, for "<" it happens to be equivalent because "<" is transitive; it's the same as a.min < b.min for non-empty "a" and "b". What about "!="? Does any(1,2) != all(1,2)? -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/