What's the function of the particle と in: トンネルを抜けると雪国であった?


> トンネルを抜けると雪国であった

Now, トンネルを抜ける means "to come out of the tunnel". 雪国 is the "Snow Country" and
であった is the past tense of である, the "to be" verb in its literary form
(according to tangorin.com).

How does と connect both these parts? What is its meaning here?




I think this 「と」 is `Conjunctive particle` which is used to **indicate the
situation right before the situation following 「と」 happened**.

So I'd interpret this sentence like:

> 「トンネルを抜ける」 ((The person) goes through the tunnel)

happened right before

> 「雪国だった」 ( _the person finds himself in a snowy country._ (← idiomatic
> interpretation))

