Skip to main content
2 of 5
added 60 characters in body
97.100.97.109
  • 7.1k
  • 12
  • 46

Python, 70 bytes

p=lambda f,n:n>9and-~p(f,(i:=lambda n:n>9and f(i(n//10),n%10)or n)(n))

Attempt This Online!

Takes in an anonymous function f and an integer n.

97.100.97.109
  • 7.1k
  • 12
  • 46