Random Scala Tip #697: Avoid Anonymous Functions as Dependencies
The Problem Imagine that you're building an app and somewhere in your code you write something like this: class DoFinanceStuff(cc: CreditCardService): def grabClientMoney(card: CardData) = val amount = // ... // ... cc.processPayment...