Documentation and tests for new append/prepend contract.