Sha256: 957833b04bcf396944cdcc0317aa2056ccd36f5730f3b9b5f0b21f258f8729b8

Contents?: true

Size: 218 Bytes

Versions: 1

Compression:

Stored size: 218 Bytes

Contents

module EnumerableExtensions
  def cart_prod( *args )
    args.inject([[]]){|old,lst|
      new = []
      lst.each{|e| new += old.map{|c| c.dup << e }}
      new
    }
  end
end

Enumerable.extend(EnumerableExtensions)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubst-0.0.1 lib/enumerable_extensions.rb