Includes solved 02-worker-pool and 09-safe-counter (mutex, atomic, sharded). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GbnJj9ZqEx9nUvzkjdwfMq
16 lines
272 B
Go
16 lines
272 B
Go
// PREDICT: does this compile? If not, why not, and what's the minimal fix?
|
|
package main
|
|
|
|
import "fmt"
|
|
|
|
type Stringer interface{ String() string }
|
|
|
|
type T struct{}
|
|
|
|
func (t *T) String() string { return "T" }
|
|
|
|
func main() {
|
|
var s Stringer = T{}
|
|
fmt.Println(s.String())
|
|
}
|