예제 #1
0
// NewSet returns a new initialised set value
func NewSet() *Set {

	return &Set{
		List: list.NewList(),
	}

}
예제 #2
0
func showList() {

	log.Println("List Example:")

	l := list.NewList()

	log.Println("We add some values to the list")
	l.InsertAtBeginning("hello")
	l.InsertAtEnd("world")

	log.Println("does the list contain 'hello' ?")
	log.Println(l.Contains("hello"))

}