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))
Takes in an anonymous function f
and an integer n
.
p=lambda f,n:n>9and-~p(f,(i:=lambda n:n>9and f(i(n//10),n%10)or n)(n))
Takes in an anonymous function f
and an integer n
.