diff --git a/ch10/sem/sem_env.go b/ch10/sem/sem_env.go index 2f68c52..07372c9 100644 --- a/ch10/sem/sem_env.go +++ b/ch10/sem/sem_env.go @@ -244,7 +244,7 @@ func (ev *SemEnv) Action(element string, input tensor.Tensor) { // String returns the string rep of the LED env state func (ev *SemEnv) String() string { cpar := ev.CurPara() - if cpar == nil { + if len(cpar) == 0 { return "" } str := cpar[0]