Use scala.Stream
Implement insertOrReplaceField