Skip to content

Instantly share code, notes, and snippets.

@seanzhou1023
seanzhou1023 / git tutorials.md
Created July 17, 2021 22:40 — forked from jaseemabid/git tutorials.md
Awesome git tutorials I am finding here and there

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
trait Car {
val doorsNb: Int
override def equals(a: Any) = {
a match {
case c: Car => doorsNb == c.doorsNb
case other => false
}
}
}
@seanzhou1023
seanzhou1023 / introrx.md
Created September 6, 2016 01:57 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing