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.
7 // Test general operation using a list implementation.
15 type ListItem struct {
24 func (list *List) Init() {
28 func (list *List) Insert(i Item) {
35 func (list *List) Print() string {
45 // Something to put in a list
50 func (this *Integer) Init(i int) *Integer {
55 func (this *Integer) Print() string {
56 return string(this.val + '0')
62 for i := 0; i < 10; i = i + 1 {
63 integer := new(Integer)
69 if r != "9876543210" {