lib/darkext/statistics.rb
# Generates a histogram hash for the array
Generates a histogram hash for the array
Generates a histogram hash for the array
def histogram
    self.sort.inject({}) do |a,x|
      a[x] = a[x].to_i + 1
      a
    end
  end
def histogram self . sort . inject ( { } ) do | a , x | a [ x ] = a [ x ] . to_i + 1 a end end
Generates a histogram hash for the array
Generates a histogram hash for the array