When a train is running on time, its status is Status.OnTime
, which does not store an associated value. When a train is delayed, however, its status is Status.Delayed(Int)
, which stores an associated integer value to represent how many minutes late the train is running.