Video

Luhn Algorithm in Java vs Scala

Compare imperative and functional implementations of the Luhn Algorithm in Java and Scala.

Taken from my course Scala Collections (which is really an all round introduction into Scala), a quick review of the Luhn Algorithm with a typical Java implementation followed by a more Scala-esq version.

I talk briefly about some of the interesting differences between the imperative style and the more functional (programming) approach.

You can find out more about Scala in my courses on Pluralsight