C++
/*
A one-liner RECUrsive reveRSE function. Observe that the reverse of ana 32-bit unsigned int
can overflow the type (eg recurse (4294967295) = 5927694924 > UINT_MAX), thus the
return type of the function should be a 64-bit int.
Usage: recurse(n)
*/
int64_t recurse(uint32_t n, int64_t reverse=0L)
{
return n ? recurse(n/10, n - (n/10)*10 + reverse * 10) : reverse;
}