// Homework 26, challenge: Stack. // // Build a stack struct that holds strings: // items -- a []string field // push(v) -- gives back a stack with v on top // pop() -- gives back a stack without the top item, and the top item // peek() -- returns the top item and true, or "" and false if empty // size() -- returns the number of items // // Push three values, then call size, peek, pop, pop, size in that order, and // print the results. // // Run with: go run exercises/26/homework/04-stack.go package main import "fmt" // TODO: define the stack struct and its methods here, outside main. func main() { // TODO: write your code here, in place of this placeholder line: fmt.Println("TODO: replace this line") }