fellshard
01/17/2017, 12:17 AMmatch(debitEntry) {
AccountsUnpaid(sources = []) -> { resubmitEntry(debitEntry) }
AccountsUnpaid(sources = [primarySource], quantity)
where primarySource in validSources
-> { total += quantity }
Depreciation(quantity) -> { total += quantity; depreciation += quantity }
}
(syntax is gonna be wacky wonky, and this is more a case for case classes still than it is for data classes. Hmm. Case data classes?)