A slightly more idiomatic incremental approach
Keep State inside scanWithStart