``` match(debitEntry) { AccountsUnpaid(sources =...
# language-proposals
f
Copy code
match(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?)