Documentation
      ¶
    
    
  
    
  
    Index ¶
- func Filter[T any](ts []T, f func(T) bool) []T
 - func GetMapKeys[K comparable, V any](data map[K]V) []K
 - func Hamming(a, b string) int
 - func Map[T, U any](ts []T, f func(T) U) []U
 - func ParseInt(value string) int
 - func ReadFile(input string) ([]string, error)
 - func Sum[T Number](ts []T) T
 - func SumOccurrences(data [][]int) map[int]int
 - type Number
 - type Point
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMapKeys ¶
func GetMapKeys[K comparable, V any](data map[K]V) []K
func Hamming ¶
Calculate Hamming distance between two strings. see https://en.wikipedia.org/wiki/Hamming_distance
func Map ¶
func Map[T, U any](ts []T, f func(T) U) []U
Return a list of elements, where the new element is the result of running the passed function.
func SumOccurrences ¶
Types ¶
type Number ¶
type Number interface {
	constraints.Integer | constraints.Float
}
     Click to show internal directories. 
   Click to hide internal directories.