Skip to content

Instantly share code, notes, and snippets.

@tonyfraser
Last active July 19, 2019 15:14
Show Gist options
  • Save tonyfraser/88dac59f75cad79c7f203e53383b7ede to your computer and use it in GitHub Desktop.
Save tonyfraser/88dac59f75cad79c7f203e53383b7ede to your computer and use it in GitHub Desktop.
udemy/Scala snd SparkfFor Big Data and Machine Learning
// scala-and-spark-for-big-data-and-machine-learning
//Section 8 lesson 33
//Find out if you have all even numbers in a list.
List(0, 2, 4).
map(_%2).sum == 0
//Lucky number 7 card problem, Add your cards, but double 7 if you get it.
List(0, 2, 5, 7).
map( i=>i match {
case 7 => 14
case _ => i
}).sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment