close over emf table in COMPUTE-DISCRIMINATING-FUNCTION

* This saves one generic function call and allows declaring the type.