The logic is sound, but a better name for `hadEvent` would be `shouldBreak?` — which is really the thing we're doing here (with a custom YAMLCallback you can stop once you've found what you wanted)