Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of about 10,000 for a$ (0.14 sec)

  1. test/typeparam/sliceimp.dir/a.go

    		r[i] = f(v)
    	}
    	return r
    }
    
    // Reduce reduces a []Elem1 to a single value of type Elem2 using
    // a reduction function.
    func Reduce[Elem1, Elem2 any](s []Elem1, initializer Elem2, f func(Elem2, Elem1) Elem2) Elem2 {
    	r := initializer
    	for _, v := range s {
    		r = f(r, v)
    	}
    	return r
    }
    
    // Filter filters values from a slice using a filter function.
    func Filter[Elem any](s []Elem, f func(Elem) bool) []Elem {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 30 01:55:58 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  2. test/typeparam/issue49497.dir/a.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    func F[T any]() A[T] {
    	var x A[T]
    	return x
    }
    
    type A[T any] struct {
    	b B[T]
    }
    
    func (a A[T]) M() C[T] {
    	return C[T]{
    		B: a.b,
    	}
    }
    
    type B[T any] struct{}
    
    type C[T any] struct {
    	B B[T]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 10 21:53:03 UTC 2021
    - 365 bytes
    - Viewed (0)
  3. test/typeparam/recoverimp.dir/a.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    import "fmt"
    
    func F[T any](a T) {
    	defer func() {
    		if x := recover(); x != nil {
    			fmt.Printf("panic: %v\n", x)
    		}
    	}()
    	panic(a)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 05 20:53:02 UTC 2021
    - 307 bytes
    - Viewed (0)
  4. test/typeparam/issue50481c.dir/a.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    type A interface {
    	int | int64
    }
    
    type B interface {
    	string
    }
    
    type C interface {
    	String() string
    }
    
    type Myint int
    
    func (i Myint) String() string {
    	return "aa"
    }
    
    type T[P A, _ C, _ B] int
    
    func (v T[P, Q, R]) test() {
    	var r Q
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 21 00:39:55 UTC 2022
    - 419 bytes
    - Viewed (0)
  5. test/typeparam/issue48306.dir/a.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    type I[T any] interface {
    	F() T
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 10 00:56:09 UTC 2021
    - 206 bytes
    - Viewed (0)
  6. test/typeparam/aliasimp.dir/a.go

    // Copyright 2020 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    type Rimp[T any] struct {
    	F T
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 204 bytes
    - Viewed (0)
  7. test/fixedbugs/issue47087.dir/a.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    func F() interface{} { return struct{ _ []int }{} }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 07 22:29:01 UTC 2021
    - 236 bytes
    - Viewed (0)
  8. test/fixedbugs/issue65957.dir/a.go

    // Copyright 2024 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    var s any
    
    //go:noinline
    func F() {
    	s = new([4]int32)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 05:32:14 UTC 2024
    - 228 bytes
    - Viewed (0)
  9. test/typeparam/issue48094b.dir/a.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    func F() { G(0) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 09 04:37:47 UTC 2021
    - 211 bytes
    - Viewed (0)
  10. test/typeparam/mdempsky/7.dir/a.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    type I[T any] interface{ M() T }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 07 11:12:24 UTC 2021
    - 218 bytes
    - Viewed (0)
Back to top