Enumerating the instances of a sealed trait.

**Please feel free to close and ignore this PR: it's actually just a tiny adjustment from Travis Brown's example from stackoverflow, which may not be appropriate for this repository.**