You're developing a system to analyze transactions for potential fraud.
You have a list of transactions, each with a variety of attributes like amount, currency, status, and a fraud score.
Your goal is to calculate total amounts for different currencies only for transactions flagged non clean.
You shall refactor ONLY the analyze_transactions
method to be the shortest possible, without changing any other pieces of the code.
This final version is the shortest I can make, but quite unreadable.
The previous version was a little longer and more readable, because it had whitespace and used
.compact
instead of a ternary operator.