Electrocatalytic reduction of polyhydric alcohols to hydrocarbons