code: func (t *InterfaceType) implementedBy(o Type) (*IMethod, bool) {
  	if len(t.methods) == 0 {
  		return nil, true
  	}
  
  	// The methods of a named interface types are those of the
  	// underlying type.
  	if it, ok := o.lit().(*InterfaceType); ok {
  		o = it
  	}
  
  	// XXX(Spec) Interface types: "A type implements any interface
  	// comprising any subset of its methods" It's unclear if
  	// methods must have identical or compatible types.  6g
  	// requires identical types.
  
  	switch o := o.(type) {
  	case *NamedType:
  		for _, tm := range t.methods {
  			sm, ok := o.methods[tm.Name]
  			if !ok || sm.decl.Type != tm.Type {
  				return &tm, false
  			}
  		}
  		return nil, true
  
  	case *InterfaceType:
  		var ti, oi int
  		for ti < len(t.methods) && oi < len(o.methods) {
  			tm, om := &t.methods[ti], &o.methods[oi]
  			switch {
  			case tm.Name == om.Name:
  				if tm.Type != om.Type {
  					return tm, false
  				}
  				ti++
  				oi++
  			case tm.Name > om.Name:
  				oi++
  			default:
  				return tm, false
  			}
  		}
  		if ti < len(t.methods) {
  			return &t.methods[ti], false
  		}
  		return nil, true
  	}
  
  	return &t.methods[0], false
  }
docs: // implementedBy tests if o implements t, returning nil, true if it does.
  // Otherwise, it returns a method of t that o is missing and false.