I'm wondering if `target` will work properly here in all cases. You could get `resource` in the block here:

```ruby
lens do |resource|
    case target(resource)
      ...
    end
end