Sha256: bd7cf101a02b9228eaa570ac5a68a2d2d9ef013563939f869df734882685b04a

Contents?: true

Size: 122 Bytes

Versions: 5

Compression:

Stored size: 122 Bytes

Contents

class Array
  def self.product(*arrays)
    return []  if arrays.empty?
    arrays.first.product(*arrays[1..-1])
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bioinform-0.1.17 lib/bioinform/support/array_product.rb
bioinform-0.1.16 lib/bioinform/support/array_product.rb
bioinform-0.1.15 lib/bioinform/support/array_product.rb
bioinform-0.1.14 lib/bioinform/support/array_product.rb
bioinform-0.1.13 lib/bioinform/support/array_product.rb