fast effectful loop macro