package
0.0.0-20241126132414-a6474f9c9b52
Repository: https://github.com/talgat-ruby/exercises-go.git
Documentation: pkg.go.dev
# README
Problem 10
Create a function that will return:
- map of brands mapped to their amount
- function to create a brand, which will return incrementer of numbers of brands item.
brands, makeBrand := factory()
toyotaIncrementer := makeBrand("Toyota")
toyotaIncrementer(1)
toyotaIncrementer(2)
hyundaiIncrementer := makeBrand("Hyundai")
hyundaiIncrementer(5)
_ := makeBrand("Kia")
fmt.Println(brands) // map[Hyundai:5 Kia:0 Toyota:3]