Skip to main content
2 of 2
added 34 characters in body
friddo
  • 613
  • 4
  • 6

Python 3.8 (pre-release), 68 bytes

lambda c:(f:=lambda p,a=0:f(p[1:],eval(f'(a{c[p[0]]})'))if p else a) 

Try it online!

replaces the '=' operator with ':=' in order to utilize python 3.8+ walrus expressions

friddo
  • 613
  • 4
  • 6