code: func ViewAndWatch(store *MemoryStore, cb func(ReadTx) error, specifiers ...api.Event) (watch chan events.Event, cancel func(), err error) {
  	// Using Update to lock the store and guarantee consistency between
  	// the watcher and the the state seen by the callback. snapshotReadTx
  	// exposes this Tx as a ReadTx so the callback can't modify it.
  	err = store.Update(func(tx Tx) error {
  		if err := cb(tx); err != nil {
  			return err
  		}
  		watch, cancel = state.Watch(store.WatchQueue(), specifiers...)
  		return nil
  	})
  	if watch != nil && err != nil {
  		cancel()
  		cancel = nil
  		watch = nil
  	}
  	return
  }
docs: // ViewAndWatch calls a callback which can observe the state of this
  // MemoryStore. It also returns a channel that will return further events from
  // this point so the snapshot can be kept up to date. The watch channel must be
  // released with watch.StopWatch when it is no longer needed. The channel is
  // guaranteed to get all events after the moment of the snapshot, and only
  // those events.