This documentation is automatically generated by online-judge-tools/verification-helper

:warning: src/collection/tally.cr

Required by

Code

module Enumerable(T)
  def tally(*, default : Int32) : Hash(T, Int32)
    each_with_object(Hash(T, Int32).new default) do |value, hash|
      hash[value] += 1
    end
  end
end
module Enumerable(T)
  def tally(*, default : Int32) : Hash(T, Int32)
    each_with_object(Hash(T, Int32).new default) do |value, hash|
      hash[value] += 1
    end
  end
end
Back to top page