day21

package
v0.0.0-...-38c8f7e Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Day21

func Day21(foods []Food) (int, string, error)

Types

type Allergen

type Allergen string

type Allergens

type Allergens map[Allergen]Ingredients

func (Allergens) ContainsNoAllergen

func (as Allergens) ContainsNoAllergen(i Ingredient) bool

func (Allergens) DeleteIngredient

func (as Allergens) DeleteIngredient(i Ingredient)

type Food

type Food struct {
	// contains filtered or unexported fields
}

func ParseInput

func ParseInput(in []string) ([]Food, error)

type Ingredient

type Ingredient string

type Ingredients

type Ingredients map[Ingredient]struct{}

func (Ingredients) Copy

func (is Ingredients) Copy() Ingredients

func (Ingredients) Intersect

func (is1 Ingredients) Intersect(is2 Ingredients)

func (Ingredients) Slice

func (is Ingredients) Slice() []Ingredient

Jump to

Keyboard shortcuts

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