code: func (c *Chain) Apply(to io.Writer, from io.Reader) error {
  	if len(*c) == 0 {
  		_, err := io.Copy(to, from)
  		return err
  	}
  
  	b1 := bp.GetBuffer()
  	defer bp.PutBuffer(b1)
  
  	if _, err := b1.ReadFrom(from); err != nil {
  		return err
  	}
  
  	b2 := bp.GetBuffer()
  	defer bp.PutBuffer(b2)
  
  	fb := &fromToBuffer{from: b1, to: b2}
  
  	for i, tr := range *c {
  		if i > 0 {
  			if fb.from == b1 {
  				fb.from = b2
  				fb.to = b1
  				fb.to.Reset()
  			} else {
  				fb.from = b1
  				fb.to = b2
  				fb.to.Reset()
  			}
  		}
  
  		if err := tr(fb); err != nil {
  			return err
  		}
  	}
  
  	_, err := fb.to.WriteTo(to)
  	return err
  }
docs: // Apply passes the given from io.Reader through the transformation chain.
  // The result is written to to.