From: "Guy N. Hurst" Date: 2000-11-09T07:29:41+09:00 Subject: [ruby-talk:6182] Re: Lazy operators Aleksi Niemel� wrote: > ... > > if month > 2 && month < 7 || month == 11 then ..... > > > > Why not: if month > 2 ^and^ < 7 ^or^ == 11 then ..... > > Oh, this must be your lucky day. I just noticed my version of Ruby (which > has started to show some signs of hackery) include Lazy operators. :) > > That means you can write the above code as > > if _(month, _ > 2, And < 7, Or == 11 ) > > Here you have too. > Wow, I am delighted that you have met this challenge already :-) (even though the underscores seem obscure) Actually, I briefly considered redefining < and >, but dismissed it thinking I couldn't... thought maybe it would be a parser job. But it is neat to see something like this! Guy N. Hurst -- HurstLinks Web Development http://www.hurstlinks.com/ Norfolk, VA - (757)623-9688 PHP/MySQL - Ruby/Perl - HTML/Javascript