
$$\text{R--CH(OH)--CH}_3 + 4\text{I}_2 + 6\text{NaOH} \xrightarrow{\Delta} \text{CHI}_3\downarrow + \text{R--COONa} + 5\text{NaI} + 5\text{H}_2\text{O}$$
Concept: The haloform reaction is a chemical test used to detect the presence of secondary methyl alcohols containing the specific structural unit $$\text{R--CH(OH)--CH}_3$$ (or ethanol, $$\text{CH}_3\text{CH}_2\text{OH}$$). In the presence of iodine and a strong base ( $$\text{I}_2 + \text{NaOH}$$ or $$\text{NaOI}$$ in situ), the alcohol is first oxidized to a methyl ketone ($$\text{R--CO--CH}_3$$), which then undergoes exhaustive halogenation at the methyl group followed by base-catalyzed cleavage to yield iodoform ($$\text{CHI}_3$$).