Exercise: Type Erasure

Test your understanding of type erasure.

We'll cover the following

Problem statement

Two types, namely Foo and Bar, are defined in the following code widget. Your task is to implement a type deduction system that returns a string representation of each of these data types by using type erasure.

Coding exercise

Get hands-on with 1400+ tech skills courses.