1 // $G $D/$F.go && $L $F.$A && ./$A.out
3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
9 var c = make(chan int);
12 for i := 0; i < len(a); i++ {
15 panicln("want", a[i], "got", n, "at", i);
39 // Accumulator generator
40 func accum(n int) (func(int) int) {
41 return func(i int) int {
47 func g(a, b func(int) int) {
79 check([]int{1,4,5,4});
84 check([]int{2,4,6,9});
87 check([]int{100,200,101,201,500,101,201,500});