Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for F1 (0.14 sec)

  1. doc/go_spec.html

    }
    
    // invalid: 1e3 is a floating-point constant
    for range 1e3 {
    }
    
    // fibo generates the Fibonacci sequence
    fibo := func(yield func(x int) bool) {
    	f0, f1 := 0, 1
    	for yield(f0) {
    		f0, f1 = f1, f0+f1
    	}
    }
    
    // print the Fibonacci numbers below 1000:
    for x := range fibo {
    	if x >= 1000 {
    		break
    	}
    	fmt.Printf("%d ", x)
    }
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 00:58:01 UTC 2024
    - 282.5K bytes
    - Viewed (0)
Back to top