Electrochemically induced Favorskii rearrangement. alpha,beta-Unsaturated amides and esters in the electrochemical reduction of polyhaloketones