Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hsldymq committed Apr 1, 2024
1 parent 1096e40 commit 588bcac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions list.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,6 @@ func (l *List[T]) Filter(predicate func(T) bool) Enumerable[T] {
return filter(l, predicate)
}

func (l *List[T]) Distinct() Enumerable[T] {
return distinct[T](l)
}

func (l *List[T]) Take(n int) Enumerable[T] {
return newEnumerator(goiter.Take(l.Iter(), n))
}
Expand Down Expand Up @@ -286,6 +282,10 @@ func (l *List[T]) SkipLast(n int) Enumerable[T] {
return newEnumerator(iterator)
}

func (l *List[T]) Distinct() Enumerable[T] {
return distinct[T](l)
}

func (l *List[T]) DistinctBy(keySelector func(T) any) Enumerable[T] {
return distinctBy(l, keySelector)
}
Expand Down

0 comments on commit 588bcac

Please sign in to comment.