blob: 87edcbe2698ffa245015bf65e45181e74feda97c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
package main
import "fmt"
import "./director_profile"
type MyB struct{} // From director_profile.B
func (p *MyB) Vfi(a int) int {
return a + 3
}
func main() {
_ = director_profile.NewA()
myb := director_profile.NewDirectorB(&MyB{})
b := director_profile.BGet_self(myb)
fi := func(a int) int {
return b.Fi(a)
}
i := 50000
a := 1
for i != 0 {
a = fi(a) // 1
a = fi(a) // 2
a = fi(a) // 3
a = fi(a) // 4
a = fi(a) // 5
a = fi(a) // 6
a = fi(a) // 7
a = fi(a) // 8
a = fi(a) // 9
a = fi(a) // 10
a = fi(a) // 1
a = fi(a) // 2
a = fi(a) // 3
a = fi(a) // 4
a = fi(a) // 5
a = fi(a) // 6
a = fi(a) // 7
a = fi(a) // 8
a = fi(a) // 9
a = fi(a) // 20
i -= 1
}
if false {
fmt.Println(a)
}
}
|