func (mm *StringAppleMap) Find(p func(string, Apple) bool) (StringAppleTuple, bool) {
	if mm == nil {
		return StringAppleTuple{}, false
	}

	mm.s.RLock()
	defer mm.s.RUnlock()

	for k, v := range mm.m {
		if p(k, v) {
			return StringAppleTuple{(k), v}, true
		}
	}

	return StringAppleTuple{}, false
}
// Find returns the first Apple that returns true for the predicate p.
// False is returned if none match.
// The original map is not modified.
Find returns the first Apple that returns true for the predicate p.
False is returned if none match.
The original map is not modified.
// Find returns the first Apple that returns true for the predicate p . // False is returned if none match . // The original map is not modified .
func (mm *StringAppleMap) Find(p func(string, Apple) bool) (StringAppleTuple, bool) {
	if mm == nil {
		return StringAppleTuple{}, false
	}
	mm.s.RLock()
	defer mm.s.RUnlock()
	for k, v := range mm.m {
		if p(k, v) {
			return StringAppleTuple{(k), v}, true
		}
	}
	return StringAppleTuple{}, false
}
func ( mm * StringAppleMap ) Find ( p func ( string , Apple ) bool ) ( StringAppleTuple , bool ) { if mm == nil { return StringAppleTuple { } , false } mm . s . RLock ( ) defer mm . s . RUnlock ( ) for k , v := range mm . m { if p ( k , v ) { return StringAppleTuple { ( k ) , v } , true } } return StringAppleTuple { } , false }
Find returns the first Apple that returns true for the predicate p.
False is returned if none match.
Find returns the first Apple that returns true for the predicate p . False is returned if none match .