aoc

package
v0.0.0-...-cd80df2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2022 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChunkSlice

func ChunkSlice[T any](slice []T, numChunks int) [][]T

func ChunkString

func ChunkString(s string, numChunks int) []string

func Clamp

func Clamp(v, min, max int) int

func Contains

func Contains[T constraints.Ordered](arr []T, a T) bool

func EqualSlice

func EqualSlice[T constraints.Ordered](a, b []T) bool

func ExcludeUniques

func ExcludeUniques[T constraints.Ordered](a, b []T) []T

func GetInput

func GetInput() string

func GetTestInput

func GetTestInput() string

func GetTestInput2

func GetTestInput2() string

func IntToStr

func IntToStr(v int) string

func ReverseSlice

func ReverseSlice[T any](s []T) []T

func Run

func Run[T constraints.Ordered, T2 constraints.Ordered](want1 T, want2 T2, f1 func(input string) T, f2 func(input string) T2)

func SplitLines

func SplitLines(s string) []string

func StrToInt

func StrToInt(s string) int

func StrToInt64

func StrToInt64(s string) int64

Types

type Position

type Position struct {
	X int
	Y int
}

func (*Position) Move

func (p *Position) Move(dx, dy int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL