How is this case class match pattern working?

When doing pattern matching, the Scala compiler will interpret o1 c1 o2 the same as c1(o1, o2). That’s why :: works inside pattern matches too.

Leave a Comment