Python, 95 91 bytes
This is a Python implementation of nimi's Haskell answer. Golfing suggestions welcome.
f=lambda z:z==[]or(z[0]+len(z)-1)*f([i-1for i in z if~-i])
p=lambda z:z==[]or f(z)*p(z[1:])
This is a Python implementation of nimi's Haskell answer. Golfing suggestions welcome.
f=lambda z:z==[]or(z[0]+len(z)-1)*f([i-1for i in z if~-i])
p=lambda z:z==[]or f(z)*p(z[1:])