Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of about 10,000 for recur1 (0.28 sec)

  1. test/typeparam/dictionaryCapture.go

    }
    
    func recursive() {
    	if got, want := recur1[int](5), 110; got != want {
    		panic(fmt.Sprintf("recur1[int](5) = %d, want = %d", got, want))
    	}
    }
    
    type Integer interface {
    	int | int32 | int64
    }
    
    func recur1[T Integer](n T) T {
    	if n == 0 || n == 1 {
    		return T(1)
    	} else {
    		return n * recur2(n-1)
    	}
    }
    
    func recur2[T Integer](n T) T {
    	list := make([]T, n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  2. test/fixedbugs/issue13799.go

    	}
    }
    
    type str struct {
    	m *int
    }
    
    func recur1(j int, s *str) { // ERROR "s does not escape"
    	if j < 100 {
    		j++
    		recur1(j, s)
    	} else {
    		*s.m++
    	}
    }
    
    func test5(iter int) {
    
    	const maxI = 500
    	var x int // ERROR "moved to heap: x$"
    	m := &x
    
    	var fn *str
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  3. internal/s3select/csv/record.go

    				// If field index > number of columns, return null
    				return sql.FromNull(), nil
    			}
    			return sql.FromBytes([]byte(r.csvRecord[idx])), nil
    		}
    		// TODO: Return Missing?
    		return nil, fmt.Errorf("column %v not found", name)
    	}
    
    	if index >= int64(len(r.csvRecord)) {
    		// No value found for column 'name', hence return null
    		// value
    		return sql.FromNull(), nil
    	}
    
    	return sql.FromBytes([]byte(r.csvRecord[index])), nil
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Sep 13 00:00:59 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  4. src/go/types/return.go

    			return true
    		}
    
    	case *ast.BlockStmt:
    		return check.isTerminatingList(s.List, "")
    
    	case *ast.IfStmt:
    		if s.Else != nil &&
    			check.isTerminating(s.Body, "") &&
    			check.isTerminating(s.Else, "") {
    			return true
    		}
    
    	case *ast.SwitchStmt:
    		return check.isTerminatingSwitch(s.Body, label)
    
    	case *ast.TypeSwitchStmt:
    		return check.isTerminatingSwitch(s.Body, label)
    
    	case *ast.SelectStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/return.txt

    expression: RETURN
    text: return 54
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed Oct 05 15:06:52 UTC 2022
    - 61 bytes
    - Viewed (0)
  6. internal/s3select/sql/record.go

    			return v, err
    		}
    		return v, nil
    	case simdjson.TypeBool:
    		v, err := iter.Bool()
    		if err != nil {
    			return nil, err
    		}
    		return v, nil
    	case simdjson.TypeObject:
    		obj, err := iter.Object(nil)
    		if err != nil {
    			return nil, err
    		}
    		return *obj, err
    	case simdjson.TypeArray:
    		arr, err := iter.Array(nil)
    		if err != nil {
    			return nil, err
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 3.4K bytes
    - Viewed (0)
  7. src/log/slog/record.go

    // Clone returns a copy of the record with no shared state.
    // The original record and the clone can both be modified
    // without interfering with each other.
    func (r Record) Clone() Record {
    	r.back = slices.Clip(r.back) // prevent append from mutating shared array
    	return r
    }
    
    // NumAttrs returns the number of attributes in the [Record].
    func (r Record) NumAttrs() int {
    	return r.nFront + len(r.back)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 16:30:56 UTC 2023
    - 6K bytes
    - Viewed (0)
  8. internal/s3select/simdj/record.go

    }
    
    // Reset the record.
    func (r *Record) Reset() {
    	r.object = simdjson.Object{}
    }
    
    // Clone the record and if possible use the destination provided.
    func (r *Record) Clone(dst sql.Record) sql.Record {
    	other, ok := dst.(*Record)
    	if !ok {
    		other = &Record{}
    	}
    	other.object = r.object
    	return other
    }
    
    // CloneTo clones the record to a json Record.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 5.4K bytes
    - Viewed (0)
  9. internal/s3select/json/record.go

    func (r *Record) Reset() {
    	if len(r.KVS) > 0 {
    		r.KVS = r.KVS[:0]
    	}
    }
    
    // Clone the record and if possible use the destination provided.
    func (r *Record) Clone(dst sql.Record) sql.Record {
    	other, ok := dst.(*Record)
    	if !ok {
    		other = &Record{}
    	}
    	if len(other.KVS) > 0 {
    		other.KVS = other.KVS[:0]
    	}
    	other.KVS = append(other.KVS, r.KVS...)
    	return other
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Feb 25 20:31:19 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  10. analysis/analysis-api/testData/components/dataFlowInfoProvider/exitPointSnapshot/controlFlow/definiteJumps/return.txt

      hasEscapingJumps = false
      hasJumps = true
      hasMultipleJumpKinds = false
      hasMultipleJumpTargets = false
      jumpExpressions = [
        return 1,
        return 2,
        return b
      ]
      returnValueType = kotlin.Int
      valuedReturnExpressions = [
        return 1,
        return 2,
        return b
      ]
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 29 17:43:55 UTC 2024
    - 370 bytes
    - Viewed (0)
Back to top