implement lexically-scoped with-variables