Implement Stack Using List Data Structure In R