fact: Fixpoint fastProductRec l : M unit := match l with | [::] => Ret tt | 0 :: _ => fail | n.+1 :: l' => get >>= fun m => put (m * n.+1) >> fastProductRec l' end.
imports: mathcomp(all_ssreflect) monae_lib hierarchy monad_lib fail_lib state_lib monad_transformer