package main

import (
	"fmt"
	"maps"
)

func main() {
	// section: example
	scores := map[string]int{
		"Alice":   85,
		"Bob":     92,
		"Charlie": 78,
		"David":   45,
		"Eve":     67,
	}

	fmt.Println("Before DeleteFunc:", scores)

	// Delete all entries where the score is below 70
	maps.DeleteFunc(scores, func(name string, score int) bool {
		return score < 70
	})

	fmt.Println("After DeleteFunc: ", scores)
	// section: example
}
