// Homework 21, problem 3: Clamp. // // Define a function clamp(x int, lo int, hi int) int that returns lo if x is // below lo, hi if x is above hi, and x otherwise. Test it with three calls: // one in range, one below, one above. // // Run with: go run exercises/21/homework/03-clamp.go package main import "fmt" // TODO: define clamp here, outside main. func main() { // TODO: print three calls to clamp, in place of this placeholder line: fmt.Println("TODO: replace this line") }