monadise_let_rec updated to use the environment