Yup, 33 bytes
*{{:0e-}-0]~{~|~|0~--e~}0~--#\}1#
Here's the github. Invoke like this:
node yup.js <location>.yup -n <input>
Or
node yup.js -l "*{{:0e-}-0]~{~|~|0~--e~}0~--#\}1#" -n <input>
Examples:
λ node yup.js -l "*{{:0e-}-0]~{~|~|0~--e~}0~--#\}1#" -n 5
120
λ node yup.js examples\factorial.yup -n 0
1
Explanation
To come.