mercredi 18 juillet 2018

How to print out the type of a list in Scala?

Here's an example of what I'm trying to do:

val ex = List[String]("a", "b", "c") typePrinter(ex) //prints out "List[String]"

Is this possible in Scala? The standard .getClass doesnt seem to work here. Thanks!





Aucun commentaire:

Enregistrer un commentaire