Express prepend and append in terms of a more generic insert().