# [Python](https://www.python.org), 70 bytes

```python
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!](https://ato.pxeger.com/run?1=m72soLIkIz9vwYKlpSVpuhY33QpscxJzk1ISFdJ08qzy7CwT81J06wo00nQ0Mq1gUjAJhTSNTI08fX1DA02dPFUgmV-kkKepkaepCTFtX0FRZl6JRoEGVF-FTqVVhXaljoKRuaEFTBHMagA)

Takes in an anonymous function `f` and an integer `n`.