AOC2022

package module
v0.0.0-...-240c287 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 7 Imported by: 0

README

AOC2022

Advent of Code 2022 in Golang :)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(x int) int

func Check

func Check(err error)

func Map

func Map[T any, S any](a []T, f func(x T) S) []S

func MapInPlace

func MapInPlace[T any](a []T, f func(x T) T)

func Max

func Max[T int | int8 | int16 | int32 | int64 | float32 | float64](xs []T) T

func Min

func Min[T int | int8 | int16 | int32 | int64 | float32 | float64](xs []T) T

apparently `T comparable` is not enough here :(

func PopBack

func PopBack[T any](xs []T) ([]T, T, error)

func PopFront

func PopFront[T any](xs []T) ([]T, T, error)

func PushBack

func PushBack[T any](xs []T, s T) []T

func PushFront

func PushFront[T any](xs []T, s T) []T

func ReadLines

func ReadLines(filename string) []string

func ReadString

func ReadString(filename string) string

func RemoveAt

func RemoveAt[T any](a []T, index int) []T

func Reverse

func Reverse[T any](a []T) []T

func Set

func Set[T comparable](a []T) []T

func SortAscending

func SortAscending(a []int) []int

func SortDescending

func SortDescending(a []int) []int

func SplitAndTrim

func SplitAndTrim(s string) []string

func StrToDigits

func StrToDigits(a string) []int

func Sum

func Sum(a []int) int

func ToIntMust

func ToIntMust(a string) int

func ToInts

func ToInts(a []string) []int

func Zip

func Zip(a string, b string) [][]byte

Types

This section is empty.

Directories

Path Synopsis
1
2
3
4
5
6
7
8
9

Jump to

Keyboard shortcuts

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