From: Adam Sanderson Date: 2006-02-14T01:43:25+09:00 Subject: Re: Command Pipeline (pipes & filters) in Ruby That's neat, this might be handy too: class Proc def |(other) proc{|*a| other.call(self.call(*a)) } end end I think I got the idea from something on Why's site, though I can't find it now. Anyways if you could now do: f = lambda {|x| x * 2} | lambda {|x| 0 - x} | lambda {|x| x + 10} or more verbosely: a = lambda {|x| x * 2} b = lambda {|x| 0 - x} c = lambda {|x| x + 10} f = (a|b|c) Think of it as unix pipes :) .adam