• + 0 comments

    For Ruby

    ar.tally.map {|_, v| v/2}.sum