Combining data abstraction, recursion, and polymorphism