From 98f5028309414bc7b5a78d2d55b33af6a3b48d95 Mon Sep 17 00:00:00 2001 From: OZoneGuy Date: Sat, 14 Oct 2023 23:04:51 -0400 Subject: [PATCH] chore - Marked untested functions --- lib.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib.go b/lib.go index 784e808..ec54336 100644 --- a/lib.go +++ b/lib.go @@ -82,6 +82,7 @@ func Count[T any](f func(T) bool, a []T) int { } // Find returns the first element of a for which f returns true, or nil if there is no such element. +// WARN: Untested func Find[T any](f func(T) bool, a []T) *T { for _, v := range a { if f(v) { @@ -92,6 +93,7 @@ func Find[T any](f func(T) bool, a []T) *T { } // FindIndex returns the index of the first element of a for which f returns true, or -1 if there is no such element. +// WARN:Untested func FindIndex[T any](f func(T) bool, a []T) int { for i, v := range a { if f(v) { @@ -102,6 +104,7 @@ func FindIndex[T any](f func(T) bool, a []T) int { } // ForEeach calls f on each element of a. +// WARN: Untested func ForEach[T any](f func(T), a []T) { for _, v := range a { f(v)