Method: Method::Composition#^
- Defined in:
- lib/core/facets/method/composition.rb
#^(n) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/core/facets/method/composition.rb', line 31 def ^(n) raise ArgumentError if n < 0 return self if n < 2 #Composition.new(self, self ^ (n-1)) (n - 1).times{ @f = @f.concat(@f) } end |