diff --git a/find.go b/find.go index fea56ef..b5c3f06 100644 --- a/find.go +++ b/find.go @@ -30,3 +30,11 @@ func FindLast[T any](source <-chan T) *T { return last } + +func HasAny[T any](source <-chan T) bool { + return FindFirst(source) != nil +} + +func HasAnyAndFlush[T any](source <-chan T) bool { + return FindFirstAndFlush(source) != nil +}