I'm currently learning Scala, but there are still so much things I just don't understand...
So, I was randomly surfing some stack overflow when a wild answer appeared: https://stackoverflow.com/a/19093282/3529754
This answer makes use of an implicit parameter and the the foldLeft function with a - yes it looks like one - japanese smiley. the source code of question:
class Account(implicit transactionLog: TransactionLog) {
def balance = transactionLog.foldLeft(_ + _)
}
class TransactionSlip(from: Account, to: Account, amount: BigDecimal)
What exactly does the implicit keyword mean in this case? What does the smiley do? I just don't get it from the snippets floating around...
Thanks in Advance.