Learning polymorphism