Lightweight type erasure matching

Scala’s pattern matching is much touted as a killer feature, and generally easy and convenient to use, but due to type erasure one needs to be somewhat careful with typed collections. Check out the following bit of code: It’s tempting to say, “this worked,” and move along, but consider the following similar code where we […]