Add `map_env` variants for use with functions returning errors