reorganized source, added test cases for tuning

This commit is contained in:
2024-06-05 16:33:35 +02:00
parent 50fab6e1a5
commit 162d141b34
33 changed files with 811 additions and 97 deletions

12
src/generics.go Normal file
View File

@@ -0,0 +1,12 @@
package main
// find an item in a list, generic variant
func Contains[E comparable](s []E, v E) bool {
for _, vs := range s {
if v == vs {
return true
}
}
return false
}