9 October 2007
andThis episode shows some syntactic improvements on the Function Composition code we demonstrated in the first video of the series.
9 October 2007
andThis episode shows some syntactic improvements on the Function Composition code we demonstrated in the first video of the series.
# Contains code by Eric Kidd, Peter Burns, and Ola Bini
lambda {|x| eval(c) }
end
end
end
self.class.complement(self)
end
self.class.compose(*(a.reverse + [self]))
end
self.class.conjoin(*([self] + a))
end
self.class.disjoin(*([self] + a))
end
alias_method :c, :complement
alias_method :*, :compose
alias_method :&, :conjoin
alias_method :|, :disjoin
alias_method :[], :call
end