local function Delegator()
  return {
    operation = function(self)
      if (type(self.delegate)=="table") and (type(self.delegate.thing)=="function") then
        return self.delegate:thing()
      else
        return "default implementation"
      end
    end
  }
end

local function Delegate()
  return {
    thing = function(self)
      return "delegate implementation"
    end
  }
end

local function NonDelegate(which)
  if (which == 1) then return true