code: func Select(a Type, x interface{}) Type {
  	switch a := a.(type) {
  	case *Array:
  		n, ok := x.(json.Number)
  		if !ok {
  			return nil
  		}
  		pos, err := n.Int64()
  		if err != nil {
  			return nil
  		}
  		return a.Select(int(pos))
  	case *Object:
  		return a.Select(x)
  	case *Set:
  		tpe := TypeOf(x)
  		if Compare(a.of, tpe) == 0 {
  			return a.of
  		}
  		if any, ok := a.of.(Any); ok {
  			if any.Contains(tpe) {
  				return tpe
  			}
  		}
  		return nil
  	case Any:
  		if Compare(a, A) == 0 {
  			return A
  		}
  		var tpe Type
  		for i := range a {
  			// TODO(tsandall): test nil/nil
  			tpe = Or(Select(a[i], x), tpe)
  		}
  		return tpe
  	default:
  		return nil
  	}
  }
docs: // Select returns a property or item of a.