fix closures with function return values, closes #33

- shallow copy function, install current_env