define extend-env: abstract extending an environment