code: func (s *Serf) reap(old []*memberState, now time.Time, timeout time.Duration) []*memberState {
  	n := len(old)
  	for i := 0; i < n; i++ {
  		m := old[i]
  
  		// Skip if the timeout is not yet reached
  		if now.Sub(m.leaveTime) <= timeout {
  			continue
  		}
  
  		// Delete from the list
  		old[i], old[n-1] = old[n-1], nil
  		old = old[:n-1]
  		n--
  		i--
  
  		// Delete from members
  		delete(s.members, m.Name)
  
  		// Tell the coordinate client the node has gone away and delete
  		// its cached coordinates.
  		if !s.config.DisableCoordinates {
  			s.coordClient.ForgetNode(m.Name)
  
  			s.coordCacheLock.Lock()
  			delete(s.coordCache, m.Name)
  			s.coordCacheLock.Unlock()
  		}
  
  		// Send an event along
  		s.logger.Printf("[INFO] serf: EventMemberReap: %s", m.Name)
  		if s.config.EventCh != nil {
  			s.config.EventCh <- MemberEvent{
  				Type:    EventMemberReap,
  				Members: []Member{m.Member},
  			}
  		}
  	}
  
  	return old
  }
docs: // reap is called with a list of old members and a timeout, and removes
  // members that have exceeded the timeout. The members are removed from
  // both the old list and the members itself. Locking is left to the caller.