Understanding Function Scope in Scala | CodeSignal Learn