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