Reaction of octahydroazecine with iodine crystals
Chlorination and bromination of alkenes are very general reactions, and mechanistic study of these reactions provides additional insight into electrophilic addition reactions of alkenes. Although much less detail is known about fluorination and iodination of alkenes, it is believed that iodination follows the similar mechanistic steps of much studied bromination (Ref.1) to give corresponding 1,2-diiodoalkane. In certain compounds, if neucleophilic center is available within vicinity of cyclic halonium center, the last step of nucleophilic attack of halide ion would be over written by much faster intramolecular cyclization as depicted by following mechanism:



This mechanism is well supported by the examples provided in Ref.1 and Ref.2.

References:


Yoshinao Tamaru, Masato Mizutani, Yutaka Furukawa, Shinichi Kawamura, Zenichi Yoshida, Kazunori Yanagi, Masao Minobe, “1,3-Asymmetric induction: highly stereoselective synthesis of 2,4-trans-disubstituted γ-butyrolactones and γ-butyrothiolactones,” J. Am. Chem. Soc. 1984, 106(4), 1079-1085 (https://doi.org/10.1021/ja00316a044).
Yvan Guindon, François Soucy, Christiane Yoakim, William W. Ogilvie, Louis Plamondon, “Diastereoselective Synthesis of 2,3,5-Trisubstituted Tetrahydrofurans via Cyclofunctionalization Reactions. Evidence of Stereoelectronic Effects,” J. Org. Chem. 2001, 66(26), 8992-8996 (https://doi.org/10.1021/jo010873r).