1 // $G $D/$F.go && $L $F.$A && ./$A.out
3 // Copyright 2010 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.
15 var m
map[complex
]complex
19 for i
:= 0; i
< len(a
); i
++ {
20 a
[i
] = cmplx(float(i
), float(-i
))
25 s
= make([]complex
, len(a
))
26 for i
:= 0; i
< len(s
); i
++ {
32 c
= make(chan complex
)
46 m
= make(map[complex
]complex
)
47 for i
:= 0; i
< len(s
); i
++ {
51 println(m
[cmplx(-5, 5)])
54 func chantest(c
chan complex
) { c
<- a
[5] }