s/digraph/digram and use intersperse

Use "digram" instead of "digraph" to match original algorithm
description.

Use intersperse "\n" in "show" for grammar to avoid extra "\n" at the
very end.