Documentation ¶
Index ¶
- Variables
- func ConvertStringsToInts(s []string) []int
- func Largest[T Number](in []T) (T, int)
- func Load[T any](convert func(string) T, grouped bool) []T
- func Map[T, S any](t []T, f func(T) S) []S
- func ReadGroupedInput() []string
- func ReadInput() []string
- func Reduce[T, S any](t []T, accumulator S, f func(T, S, int) S) S
- func Select[T any](in []T, f func(i T) bool) (out []T)
- func Smallest[T Number](in []T) (T, int)
- func SumList[T Number](in []T) (total T)
- type Number
Constants ¶
This section is empty.
Variables ¶
View Source
var LoadStringOverride = ""
Functions ¶
func ConvertStringsToInts ¶
ConvertStringsToInts - converts input to ints if appropriate
func ReadGroupedInput ¶
func ReadGroupedInput() []string
ReadGroupedInput returns groups of input separated by empty lines
Types ¶
type Number ¶
type Number interface { constraints.Float | constraints.Integer }
Click to show internal directories.
Click to hide internal directories.