ADS-framework/helloStack.go
2016-02-20 00:24:14 +01:00

18 lines
256 B
Go

package collection_test
import (
collection "."
"fmt"
)
func Example() {
var s collection.Stack
s.Push("world")
s.Push("hello, ")
for s.Size() > 0 {
fmt.Print(s.Pop())
}
fmt.Println()
// Output: hello, world
}