Documentation
¶
Index ¶
- func AbsDiff[I Integer](x, y I) I
- func AddSolution[I any, O1 any, O2 any](day int, parse func(string) (I, error), part1 func(I) (O1, error), ...)
- func AllFunc[T any](inputs []T, f func(T) bool) bool
- func AnyFunc[T any](inputs []T, f func(T) bool) bool
- func AssertEqual[T comparable](t *testing.T, actual T, expected T)
- func AssertSliceEqual[T comparable](t *testing.T, actual []T, expected []T)
- func CopyAdd[K comparable, V any](m map[K]V, k K, v V) map[K]V
- func CopyAppend[T any](sl []T, pos T) []T
- func CopyMap[K comparable, V any](m map[K]V) map[K]V
- func CountTrueFunc[T any](inputs []T, f func(T) bool) int
- func GCD(a int, b int) int
- func GetInput(day int) (string, error)
- func PopMap[K comparable, V any](m map[K]V) (K, V)
- func Solve[I any, O1 any, O2 any](input_string string, parse func(string) (I, error), part1 func(I) (O1, error), ...) error
- func SolveDay(day int, input string) error
- func Sum[V Number](values []V) V
- func SumFunc[T any, V Number](inputs []T, f func(T) V) V
- type Integer
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSolution ¶
func AssertEqual ¶
func AssertEqual[T comparable](t *testing.T, actual T, expected T)
func AssertSliceEqual ¶
func AssertSliceEqual[T comparable](t *testing.T, actual []T, expected []T)
func CopyAdd ¶
func CopyAdd[K comparable, V any](m map[K]V, k K, v V) map[K]V
func CopyAppend ¶
func CopyAppend[T any](sl []T, pos T) []T
func CopyMap ¶
func CopyMap[K comparable, V any](m map[K]V) map[K]V
func CountTrueFunc ¶
func PopMap ¶
func PopMap[K comparable, V any](m map[K]V) (K, V)
Types ¶
Click to show internal directories.
Click to hide internal directories.