Sha256: 15e988636541cf03715c0112b4e8ac77a25deb9cdc99c14ae301335305d7d5ee

Contents?: true

Size: 70 Bytes

Versions: 15

Compression:

Stored size: 70 Bytes

Contents

class Array
  def sum
    return 0 if empty?
    inject(:+)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
trollolo-0.3.1 lib/array.rb
trollolo-0.3.0 lib/array.rb
trollolo-0.2.0 lib/array.rb
trollolo-0.1.1 lib/array.rb
trollolo-0.1.0 lib/array.rb
trollolo-0.0.14 lib/array.rb
trollolo-0.0.12 lib/array.rb
trollolo-0.0.11 lib/array.rb
trollolo-0.0.10 lib/array.rb
trollolo-0.0.9 lib/array.rb
trollolo-0.0.8 lib/array.rb
trollolo-0.0.7 lib/array.rb
trollolo-0.0.6 lib/array.rb
trollolo-0.0.5 lib/array.rb
trollolo-0.0.4 lib/array.rb