public function letter_frequency()
    {
        return $this->transform(
            function ($frequencies, $word) {
                foreach (count_chars($word, 1) as $byte => $frequency) {
                    $letter = chr($byte);
                    if ($frequencies->has($letter)) {
                        $frequencies->set($letter, $frequencies->get($letter)+1);
                    } else {
                        $frequencies->set($letter, 1);
                    }
                }
            },
            function (Map $original) { return new MapOfInts(); }
        );
    }