Implement pop with slice.