Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for sortedFuncs (0.15 sec)

  1. src/go/doc/reader.go

    		list[i] = &Type{
    			Doc:     t.doc,
    			Name:    t.name,
    			Decl:    t.decl,
    			Consts:  sortedValues(t.values, token.CONST),
    			Vars:    sortedValues(t.values, token.VAR),
    			Funcs:   sortedFuncs(t.funcs, true),
    			Methods: sortedFuncs(t.methods, allMethods),
    		}
    		i++
    	}
    
    	slices.SortFunc(list, func(a, b *Type) int {
    		return strings.Compare(a.Name, b.Name)
    	})
    
    	return list
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  2. src/go/doc/doc.go

    		Bugs:       noteBodies(r.notes["BUG"]),
    		Consts:     sortedValues(r.values, token.CONST),
    		Types:      sortedTypes(r.types, mode&AllMethods != 0),
    		Vars:       sortedValues(r.values, token.VAR),
    		Funcs:      sortedFuncs(r.funcs, true),
    
    		importByName: r.importByName,
    		syms:         make(map[string]bool),
    	}
    
    	p.collectValues(p.Consts)
    	p.collectValues(p.Vars)
    	p.collectTypes(p.Types)
    	p.collectFuncs(p.Funcs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  3. doc/next/6-stdlib/3-iter.md

    - [AppendSeq](/pkg/slices#AppendSeq) appends values from an iterator to
      an existing slice.
    - [Sorted](/pkg/slices#Sorted) collects values from an iterator into a
      new slice, and then sorts the slice.
    - [SortedFunc](/pkg/slices#SortedFunc) is like `Sorted` but with a
      comparison function.
    - [SortedStableFunc](/pkg/slices#SortedStableFunc) is like `SortFunc`
      but uses a stable sort algorithm.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:13 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  4. src/slices/iter.go

    // and returns it.
    func Sorted[E cmp.Ordered](seq iter.Seq[E]) []E {
    	s := Collect(seq)
    	Sort(s)
    	return s
    }
    
    // SortedFunc collects values from seq into a new slice, sorts the slice
    // using the comparison function, and returns it.
    func SortedFunc[E any](seq iter.Seq[E], cmp func(E, E) int) []E {
    	s := Collect(seq)
    	SortFunc(s, cmp)
    	return s
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:40:32 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. src/slices/iter_test.go

    }
    
    func TestSorted(t *testing.T) {
    	s := Sorted(Values(ints[:]))
    	if !IsSorted(s) {
    		t.Errorf("sorted %v", ints)
    		t.Errorf("   got %v", s)
    	}
    }
    
    func TestSortedFunc(t *testing.T) {
    	s := SortedFunc(Values(ints[:]), func(a, b int) int { return a - b })
    	if !IsSorted(s) {
    		t.Errorf("sorted %v", ints)
    		t.Errorf("   got %v", s)
    	}
    }
    
    func TestSortedStableFunc(t *testing.T) {
    	n, m := 1000, 100
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  6. api/go1.23.txt

    pkg slices, func Collect[$0 interface{}](iter.Seq[$0]) []$0 #61899
    pkg slices, func Repeat[$0 interface{ ~[]$1 }, $1 interface{}]($0, int) $0 #65238
    pkg slices, func SortedFunc[$0 interface{}](iter.Seq[$0], func($0, $0) int) []$0 #61899
    pkg slices, func SortedStableFunc[$0 interface{}](iter.Seq[$0], func($0, $0) int) []$0 #61899
    pkg slices, func Sorted[$0 cmp.Ordered](iter.Seq[$0]) []$0 #61899
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 20:48:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top