diff --git a/list/list.go b/list/list.go index 3ac4b8b..2118d73 100644 --- a/list/list.go +++ b/list/list.go @@ -146,23 +146,6 @@ func Max[T constraints.Ordered](l List[T]) T { return v } -// This doesn't work but I wish it did: -// -// func (l List[T Ordered]) Max() T { -// if l.Empty() { -// var v T -// return v -// } -// -// v := l.head.val -// for n := l.head.next; n != nil; n = n.next { -// if n.val > v { -// v = n.val -// } -// } -// return v -// } - // Map applies the input function f to each element of the list l, returning a // new list containing the values produced by f func (l List[T]) Map(f func(T) T) List[T] {