Comment Comment by asm89 It's hard to give a TL;DR on the whole library, but case classes can be used with for example pattern matching (https://github.com/lihaoyi/macropy#pattern-matching).The following code: with patterns: Foo(x, Bar(3, z)) << Foo(4, Bar(3, 8)) The constructor after the << will be matched with the part before <<. It will only match if the first argument of "Bar" is 3. If that's the case, x and z will be bound to 4 and 8.Does this help? :) parent asm89 13 years ago
The following code:
The constructor after the << will be matched with the part before <<. It will only match if the first argument of "Bar" is 3. If that's the case, x and z will be bound to 4 and 8.Does this help? :)