func (mm *ImmutableStringAppleMap) Partition(p func(string, Apple) bool) (matching *ImmutableStringAppleMap, others *ImmutableStringAppleMap) {
	if mm == nil {
		return nil, nil
	}

	matching = NewImmutableStringAppleMap()
	others = NewImmutableStringAppleMap()

	for k, v := range mm.m {
		if p(k, v) {
			matching.m[k] = v
		} else {
			others.m[k] = v
		}
	}
	return
}
// Partition applies the predicate p to every element in the map. It divides the map into two copied maps,
// the first containing all the elements for which the predicate returned true, and the second containing all
// the others.
Partition applies the predicate p to every element in the map. It divides the map into two copied maps,
the first containing all the elements for which the predicate returned true, and the second containing all
the others.
// Partition applies the predicate p to every element in the map . It divides the map into two copied maps // the first containing all the elements for which the predicate returned true and the second containing all // the others .
func (mm *ImmutableStringAppleMap) Partition(p func(string, Apple) bool) (matching *ImmutableStringAppleMap, others *ImmutableStringAppleMap) {
	if mm == nil {
		return nil, nil
	}
	matching = NewImmutableStringAppleMap()
	others = NewImmutableStringAppleMap()
	for k, v := range mm.m {
		if p(k, v) {
			matching.m[k] = v
		} else {
			others.m[k] = v
		}
	}
	return
}
func ( mm * ImmutableStringAppleMap ) Partition ( p func ( string , Apple ) bool ) ( matching * ImmutableStringAppleMap , others * ImmutableStringAppleMap ) { if mm == nil { return nil , nil } matching = NewImmutableStringAppleMap ( ) others = NewImmutableStringAppleMap ( ) for k , v := range mm . m { if p ( k , v ) { matching . m [ k ] = v } else { others . m [ k ] = v } } return }
Partition applies the predicate p to every element in the map.
Partition applies the predicate p to every element in the map .