Last active
July 19, 2019 15:14
-
-
Save tonyfraser/88dac59f75cad79c7f203e53383b7ede to your computer and use it in GitHub Desktop.
udemy/Scala snd SparkfFor Big Data and Machine Learning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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