From: William Djaja Tjokroaminata Date: 2002-10-17T12:45:50+09:00 Subject: Re: Please check my algorithm Well, I personally do not object obfuscation as long as it is significantly "faster" (much faster, if possible) :) But of course, the best is if it is faster and yet explicit/clear... Regards, Bill =========================================================================== Mike Campbell wrote: >> > t = 0 >> > ISBN_RE.match(self) && >> > numbers.inject(0) {|x,y| t += x+y; x+y } && >> > (t % 11) .zero? >> > end >> >> ISBN_RE.match(self) && >> ( (numbers.inject([0]){|x,y| x << (x[-1]+y)}.inject(0){|x,y| x+y}) % 11).zero? >> >> martin > Was the intent here to shorten the code to beyond obfuscation threshholds? > I thought that was one thing so many on this group rail against perl for...