Add digit reversal function.