Created
March 29, 2017 19:01
-
-
Save anonymous/68d5a71f7b109eb05d98768f4a1daee4 to your computer and use it in GitHub Desktop.
Scala Kata shared content
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
import com.scalakata._ | |
@instrument class Playground { | |
class Person { | |
def name = "Ralph" | |
} | |
def f(p: Option[Person]): String = { | |
p.map(_.name).getOrElse("nope") | |
} | |
f(None) | |
f(Some(new Person)) | |
help | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment