code: func (t *table) tryPut(l *State, k, v value) bool {
  	switch k := k.(type) {
  	case nil:
  	case float64:
  		if i := int(k); float64(i) == k && 0 < i && i <= len(t.array) && t.array[i-1] != nil {
  			t.array[i-1] = v
  			return true
  		} else if math.IsNaN(k) {
  			return false
  		} else if t.hash[k] != nil && v != nil {
  			t.hash[k] = v
  			return true
  		}
  	case string:
  		if t.hash[k] != nil && v != nil {
  			t.hash[k] = v
  			return true
  		}
  	default:
  		if t.hash[k] != nil && v != nil {
  			t.hash[k] = v
  			return true
  		}
  	}
  	return false
  }
docs: // OPT: tryPut is an optimized variant of the at/put pair used by setTableAt to avoid hashing the key twice.