Documentation
¶
Overview ¶
Package helpers provides helper functions for Advent of Code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtoiSlice ¶
AtoiSlice is a wrapper around Atoi that calls it for each string in the given slice. Deprecated: use Map(s, Atoi) instead.
func MakeRange ¶
MakeRange creates a slice containing integers from start to end inclusive. Returns an empty slice if start == end.
func Map ¶
func Map[T, V any](slice []T, fn func(T) V) []V
Map applies the given function to each element in the given slice and returns a new slice with the results.
Types ¶
type Scanner ¶
Scanner is a wrapper around bufio.Scanner that also has a Close method.
func NewScanner ¶
NewScanner returns a new Scanner for the given filepath. If opening path fails log.Fatalf is called.
Click to show internal directories.
Click to hide internal directories.