I'm trying to write a tactic that returns a value, and in the course of doing so it needs to check if something is an evar.

Unfortunately, I can't use `is_evar` because then the tactic isn't deemed to return a value (but rather another tactic). An example is below.

Any suggestions?

```
Ltac reify_wrt values ls :=
  match ls with
  | nil => constr:(@nil nat)
  | ?a :: ?ls' => let i := lookup a values in
                 let idx := reify_wrt values ls' in
                 constr:(i :: idx)
  | ?e :: ?ls' => is_evar e; 
                  let i := constr:(100) in 
                  let idx := reify_wrt values ls' in
                  constr:(i :: idx)
  end.

```