upgrade NFALambda/toDFA function implementation