// Homework 30, challenge: Stack with a guard. This file is finished. Finish // stack/stack.go. // // Run from this folder: // cd exercises/30/homework/04-stack // go run . package main import ( "fmt" "stackmodule/stack" ) func main() { s := stack.New() s.Push("a") s.Push("b") fmt.Println(s.Size()) for i := 0; i < 3; i++ { top, err := s.Pop() if err != nil { fmt.Println("Error:", err) continue } fmt.Println(top) } fmt.Println(s.Size()) }