diff --git a/list/list.go b/list/list.go index a4afd33..df18071 100644 --- a/list/list.go +++ b/list/list.go @@ -69,10 +69,6 @@ func (this *EmptyList) First() any { return nil } -func IsEmpty(this IList) bool { - return this == nil || this.IsEmpty() -} - func (this *List) IsEmpty() bool { return false } @@ -86,7 +82,7 @@ func (this *List) String() string { sb.WriteRune('(') // Iterate and print elements var e IList - for e = this; !IsEmpty(e); e = e.Rest() { + for e = this; !e.IsEmpty(); e = e.Rest() { sb.WriteString(fmt.Sprint(e.First())) sb.WriteRune(' ') }