An insight into the Lewis acid-catalyzed intramolecular aminocyanation and oxycyanation of alkenes: a concerted or stepwise mechanism.