Imagine you were reading this article in a busy café. You would probably notice that the degree of attentional focus required for reading waxes and wanes in unison with the noise from other patrons ...
A signature of cognitive flexibility is the ability to adapt to a changing task demand. Oftentimes, the relevant task is not explicitly instructed, but needs to be inferred from previous experiences.