Skip to content

Instantly share code, notes, and snippets.

View fkautz's full-sized avatar

Frederick F. Kautz IV fkautz

View GitHub Profile
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>roadcasting Your</h3>
<h1>eveal.js</h1>
<h2>lideshow Presentations</h2>
<h1>LIVE</h1>
<p>on</p>
<img style="disply:block;border:none;background:none;box-shadow:none;width:50%;" alt='Docker-logo' src='https://gist.githubusercontent.com/ryanj/7ebf56442930b4c2188b/raw/6a6e03247efb03a0eee24a12f7beaf1ab4634563/Docker-whale.png'/>
<p class='fragment'><small><a href='http://dockercon-slides.com/'>dockercon-slides.com</a><br/>
<a href='http://github.com/ryanj/gist-reveal.it'>github.com/ryanj/gist-reveal.it</a></small></p>
</section>
object Chaining {
val xs = List(1,2,3,4,5) //> xs : List[Int] = List(1, 2, 3, 4, 5)
def square(x:Int):Int = x*x //> square: (x: Int)Int
def even(x:Int):Boolean = x%2 == 0 //> even: (x: Int)Boolean
//// SHORT EXAMPLE
xs map square // <-- Prefer //> res0: List[Int] = List(1, 4, 9, 16, 25)
// vs
xs.map(square) //> res1: List[Int] = List(1, 4, 9, 16, 25)