remove cruft

master
Jordan Orelli 3 years ago
parent 4598d396db
commit 369c02d360

@ -146,23 +146,6 @@ func Max[T constraints.Ordered](l List[T]) T {
return v 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 // Map applies the input function f to each element of the list l, returning a
// new list containing the values produced by f // new list containing the values produced by f
func (l List[T]) Map(f func(T) T) List[T] { func (l List[T]) Map(f func(T) T) List[T] {

Loading…
Cancel
Save