Hmm, I probably prefer the old code here, since the check against a primitive failure isn't really idiomatic. Another way perhaps would be to create a new method on Proc that the from_env primitive and this code can call.