I hereby claim:
- I am themathmagician on github.
- I am themathmagician (https://keybase.io/themathmagician) on keybase.
- I have a public key ASBFhB5F3Wo5pZRW2-hXSx7BR3ST7DEoqwZNlma9erqANgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$docker run --name purposedb -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
$docker ps
// Map a list to a frequency list by using groupBy with identity and mapValues | |
val chars = "Peace and harmony" | |
chars.groupBy(identity).mapValues(_.size).toList | |
//Use a tupple: type to pass in two arguments for pattern matching, like goldilocks("porridge", "Mama") | |
def goldilocks(tuple: (String, String)) = tuple match { | |
case ("porridge", "Papa") ⇒ "Papa eating porridge" | |
case ("porridge", "Mama") ⇒ "Mama eating porridge" | |
case ("porridge", "Baby") ⇒ "Baby eating porridge" | |
case _ ⇒ "what?" |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |