diff --git a/list/list.go b/list/list.go index 04e6163..a4afd33 100644 --- a/list/list.go +++ b/list/list.go @@ -54,9 +54,6 @@ func (this *EmptyList) Conj(val any) IList { } func (this *List) Rest() IList { - if this == nil { - return emptyList - } return this.next } @@ -65,9 +62,6 @@ func (this *EmptyList) Rest() IList { } func (this *List) First() any { - if this == nil { - return nil - } return this.Value } @@ -88,10 +82,6 @@ func (this *EmptyList) IsEmpty() bool { } func (this *List) String() string { - if IsEmpty(this) { - return "()" - } - var sb strings.Builder sb.WriteRune('(') // Iterate and print elements