Implement functional inheritance Stack