Cognitive flexibility for polymaths