code: func (w *WAL) Segments() (first, last int, err error) {
  	refs, err := listSegments(w.dir)
  	if err != nil {
  		return 0, 0, err
  	}
  	if len(refs) == 0 {
  		return -1, -1, nil
  	}
  	return refs[0].index, refs[len(refs)-1].index, nil
  }
docs: // Segments returns the range [first, n] of currently existing segments.
  // If no segments are found, first and n are -1.