From: "Hal E. Fulton" Date: 2000-07-07T18:16:15-07:00 Subject: [ruby-talk:03896] Re: Array.uniq! returning nil That's a very interesting idea, Hugh. But how does the caller know that the cut failed? Hal > > Thank you. One more might be a new operator. I don't know > what to call it so I will call it cut for now, for the sake > of argument: > > a.modifier!().cut.method1.method2 > > where cut short-circuits the other methd calls if its receiver > is nil. Otherwise it returns its receiver, passing it on for > the subsequent methods. > > Then nil.cut would be like failure in Icon, the rest of the > statement is not executed, but nobody gets upset about it. > > I think cut is the wrong name because cut is complelely different > in prolog, IIRC, and it doesn't look like an operator. might > look like a conditional cutting action.... > > Hugh > hgs@dmu.ac.uk >