Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 747 for yield (0.05 sec)

  1. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    ⚫️ 5️⃣📆 😋 🤚 `HTTPException` ⚖️ 🎏 🚪 📟, ⏮️ `yield`. ✋️ **⚫️ 🏆 🚫 👷**.
    
    🚪 📟 🔗 ⏮️ `yield` 🛠️ *⏮️* 📨 📨, [⚠ 🐕‍🦺](../handling-errors.md#_4){.internal-link target=_blank} 🔜 ✔️ ⏪ 🏃. 📤 🕳 😽 ⚠ 🚮 👆 🔗 🚪 📟 (⏮️ `yield`).
    
    , 🚥 👆 🤚 `HTTPException` ⏮️ `yield`, 🔢 (⚖️ 🙆 🛃) ⚠ 🐕‍🦺 👈 ✊ `HTTPException`Ⓜ & 📨 🇺🇸🔍 4️⃣0️⃣0️⃣ 📨 🏆 🚫 📤 ✊ 👈 ⚠ 🚫🔜.
    
    👉 ⚫️❔ ✔ 🕳 ⚒ 🔗 (✅ 💽 🎉), 🖼, ⚙️ 🖥 📋.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. test/range4.go

    package main
    
    var gj int
    
    func yield4x(yield func() bool) {
    	_ = yield() && yield() && yield() && yield()
    }
    
    func yield4(yield func(int) bool) {
    	_ = yield(1) && yield(2) && yield(3) && yield(4)
    }
    
    func yield3(yield func(int) bool) {
    	_ = yield(1) && yield(2) && yield(3)
    }
    
    func yield2(yield func(int) bool) {
    	_ = yield(1) && yield(2)
    }
    
    func testfunc0() {
    	j := 0
    	for range yield4x {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 16:00:53 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  3. src/reflect/iter.go

    			break
    		}
    		return func(yield func(Value) bool) {
    			v = v.Elem()
    			for i := range v.Len() {
    				if !yield(ValueOf(i)) {
    					return
    				}
    			}
    		}
    	case Array, Slice:
    		return func(yield func(Value) bool) {
    			for i := range v.Len() {
    				if !yield(ValueOf(i)) {
    					return
    				}
    			}
    		}
    	case String:
    		return func(yield func(Value) bool) {
    			for i := range v.String() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 13:40:11 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  4. src/runtime/race/testdata/rangefunc_test.go

    	"testing"
    )
    
    type Seq2[T1, T2 any] func(yield func(T1, T2) bool)
    
    // ofSliceIndex returns a Seq over the elements of s. It is equivalent
    // to range s, except that it splits s into two halves and iterates
    // in two separate goroutines.  This is racy if yield is racy, and yield
    // will be racy if it contains an early exit.
    func ofSliceIndex[T any, S ~[]T](s S) Seq2[int, T] {
    	return func(yield func(int, T) bool) {
    		c := make(chan bool, 2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  5. src/runtime/testdata/testprog/coro.go

    	return nil
    }
    
    func iterSimple(yield func(int) bool) {
    	for range 3 {
    		if !yield(5) {
    			return
    		}
    	}
    }
    
    func iterNested(yield func(int) bool) {
    	next, stop := iter.Pull(iterSimple)
    	for {
    		v, ok := next()
    		if ok {
    			if !yield(v) {
    				stop()
    			}
    		} else {
    			return
    		}
    	}
    }
    
    func iterLock(yield func(int) bool) {
    	for range 3 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 19:46:10 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. src/iter/iter.go

    // When called as seq(yield), seq calls yield(v) for each value v in the sequence,
    // stopping early if yield returns false.
    type Seq[V any] func(yield func(V) bool)
    
    // Seq2 is an iterator over sequences of pairs of values, most commonly key-value pairs.
    // When called as seq(yield), seq calls yield(k, v) for each pair (k, v) in the sequence,
    // stopping early if yield returns false.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  7. src/runtime/testdata/testprogcgo/coro.go

    	})
    	return err
    }
    
    func iterSimple(yield func(int) bool) {
    	for range 3 {
    		if !yield(5) {
    			return
    		}
    	}
    }
    
    func iterNested(yield func(int) bool) {
    	next, stop := iter.Pull(iterSimple)
    	for {
    		v, ok := next()
    		if ok {
    			if !yield(v) {
    				stop()
    			}
    		} else {
    			return
    		}
    	}
    }
    
    func iterCallback(yield func(int) bool) {
    	for range 3 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 19:46:10 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. src/maps/iter.go

    	return func(yield func(K, V) bool) {
    		for k, v := range m {
    			if !yield(k, v) {
    				return
    			}
    		}
    	}
    }
    
    // Keys returns an iterator over keys in m.
    // The iteration order is not specified and is not guaranteed
    // to be the same from one call to the next.
    func Keys[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[K] {
    	return func(yield func(K) bool) {
    		for k := range m {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 13:41:45 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  9. src/slices/iter.go

    	return func(yield func(int, E) bool) {
    		for i, v := range s {
    			if !yield(i, v) {
    				return
    			}
    		}
    	}
    }
    
    // Backward returns an iterator over index-value pairs in the slice,
    // traversing it backward. The indexes range from len(s)-1 down to 0.
    func Backward[Slice ~[]E, E any](s Slice) iter.Seq2[int, E] {
    	return func(yield func(int, E) bool) {
    		for i := len(s) - 1; i >= 0; i-- {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:40:32 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  10. src/go/ast/walk_test.go

    	// in the middle of walking a node. Previously, incorrect handling of the
    	// boolean returned by the yield function resulted in the iterator calling
    	// yield for sibling nodes even after yield had returned false. With that
    	// bug, this test failed with a runtime panic.
    	src := "package p\ntype T struct {\n\tF int `json:\"f\"` // a field\n}\n"
    
    	fset := token.NewFileSet()
    	f, err := parser.ParseFile(fset, "", src, 0)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 916 bytes
    - Viewed (0)
Back to top