code: func readUntil(in []string, pred func(prev *string, line string) (stop bool)) (read, left []string) {
  	var prev *string
  	idx := 0
  	for idx < len(in) && !pred(prev, in[idx]) {
  		prev = &in[idx]
  		idx++
  	}
  	return in[:idx], in[idx:]
  }
docs: // readUtil reads lines until 'pred' returns true.
  //
  // Returns the lines read as 'read' and whatever left as 'left'. When returns,
  // 'left' is either empty or pred(&read[len(read)-1], left[0]) is true (where
  // the pointer is actually nil if len(read) == 0).
  //
  // 'prev' is a line before the currently examined line or nil if the currently
  // examined line is the first in 'in'.