Update tail(), head(), rev(), and rep()

functions appear to work as expected.