SlideShare a Scribd company logo
Part 1
Scala for … you ?
Katrin Shechtman, Senior Software Engineer at BoldRadius
01
Who am I?
✤ C —> C++ —> Java —> Scala!
✤ https://ca.linkedin.com/in/
katrinshechtman!
✤ https://github.com/katrinsharp!
✤ @katrinsh!
✤ katrin.shechtman@boldradius.co
m
Who are you?
Feeling about
Scala
Java
Developer
DBA
DevOps/
SysAdmin
ETL Engineer
I don’t like it! ?? ?? ?? ??
I don’t really
care
?? ?? ?? ??
I’m curios to
know more
?? ?? ?? ??
I’m totally in
with it
?? ?? ?? ??
Let’s talk about Java!
Who is on with Java 8? Lambdas?
There will be some code examples using Java 8, 

but don’t worry, its knowledge is only nice to have 

for this presentation.
String greeting = "Hello World";
–There are so many things that compiler and I know!
String greeting = "Hello World";
–We both know that it is String, what else could it be?
greeting = "Hello World";
–Each of us also knows where the line ends..
greeting = "Hello World" .. Nice..!
But it is too simplistic. !
What about something beefy.. generics?
–The crowd
class SpecialId {!
! public String id;!
! public SpecialId(String id) {!
! ! this.id = id; !
! }!
}

List<SpecialId> list = new LinkedList<SpecialId>();

list.add(new SpecialId("1234"));
–Doesn’t compiler know that it is a list of (at least) SpecialIds?
Why not:!
list = List<SpecialId>()!
or if you populate it right away:!
list = List(new SpecialId("1234"))
– Good question, heh?
greeting = "Hello World"!
list = List(new SpecialId("1234"))
–So far so good. What about SpecialId?
class SpecialId {!
! public String id;!
! public SpecialId(String id) {!
! ! this.id = id; !
! }!
}
–What if we could just let compiler know what members the class
has and compiler will do the rest?
class SpecialId(String id)!
id = SpecialId("1234")
–Remember the compiler knows that id is type of SpecialId
greeting = "Hello World"!
class SpecialId(String id)!
list = List(new SpecialId("1234"))
–Much more concise. What else?
class Service(String name)!
class Signup(SpecialId id, Service service)!
list = List<Signup>() //populated somewhere else
–How to get map of users per service?
✤ ol’ loop over iterator. !
✤ Java 8 lambdas: 

Map<Service, List<Signup>> m = list.stream()

.collect(Collectors.groupingBy((signup) ->
signup.service));
How to get map of users per service?
Map<Service, List<Signup>> m = list.stream()

.collect(Collectors.

groupingBy((signup) -> signup.service));
–What really matters here is collection (list), action (grouping by)
and mapping function.
So why not to focus on what really matters?!
m = list.groupingBy(signup -> signup.service)
–Why not?
greeting = "Hello World"!
class SpecialId(String id)!
list = List(new SpecialId(“1234"))!
m = list.groupingBy(signup -> signup.service)
–This looks like more succinct language syntax.
Welcome to Scala -
JavaVM based and functional
language
val greeting = "Hello World"!
case class SpecialId(String id)!
case class Signup(id: SpecialId, service: Service)!
val signupList = 

List(Signup(SpecialId("1234"), Service("service1")), …)!
val m = signupList.groupBy(signup => signup.service)
Scala in a nutshell
✤ Statically typed + type inference.!
✤ Immutability: val vs var . !
✤ Built-in support for better equals, hashCode and
toString in case classes.!
✤ Object Oriented: no primitives, classes, inheritance,
traits mix-ins.
Part 1 (spot part 2 for other Scala features)
Statically typed w/ type inference
✤ Statically typed:

val shouldBeString: String = 12 

//type mismatch; found : Int(12) required: String

def reminder(fraction: Int, denom: Int): Int = {

fraction % denom

} !
✤ Type inference:

val willBeInt = 12

def reminder(fraction: Int, denom: Int) = fraction % denom
Scala in a nutshell
✤ Statically typed + type inference.!
✤ Immutability: val vs var . !
✤ Built-in support for better equals, hashCode and
toString in case classes.!
✤ Object Oriented: no primitives, classes, inheritance,
traits mix-ins.
Part 1 (spot part 2 for other Scala features)
Immutability
✤ Mutable vs immutable:

val str1 = "immutable string"

var str2 = "I can change"

str1 = "Compilation error..." //reassignment to val

str2 = "Now I'm different, no problem”!
✤ Mutable variable vs mutable collection:

var mutableList = List("1", "2")

mutableList = mutableList :+ "3"

val mutableList2 = MutableList("1", "2")

mutableList2 += “3"!
✤ Everything is expression:

val isSomething = if(cond) true else false
Scala in a nutshell
✤ Statically typed + type inference.!
✤ Immutability: val vs var . !
✤ Built-in support for better equals, hashCode and
toString in case classes.!
✤ Object Oriented: no primitives, classes, inheritance,
traits mix-ins.
Part 1 (spot part 2 for other Scala features)
Remember Signup case class?
✤ toString():

println(Signup(SpecialId("1"), Service("s1")))

will print Signup(SpecialId(1),Service(s1))!
✤ equals(): 

val signup = Signup(SpecialId("1"), Service(“s1"))

val signup2 = Signup(SpecialId("1"), Service("s1"))

signup == signup2 // will return true
Scala in a nutshell
✤ Statically typed + type inference.!
✤ Immutability: val vs var . !
✤ Built-in support for better equals, hashCode and
toString in case classes.!
✤ Object Oriented: no primitives, classes, inheritance,
traits mix-ins.
Part 1 (spot part 2 for other Scala features)
Object Oriented
✤ No primitives: Int, Boolean etc!
✤ Traits - interfaces with methods!
✤ Classes and case classes!
✤ Single inheritance, multiple mix-ins
trait Fruit {!
! def isGreen: Boolean!
! def isLowCalories = false!
} !
trait Size {!
! def size: String!
} !
trait Apple extends Fruit {!
! val isLowCalories = isGreen!
} !
class GreenApple(name: String) extends Apple {!
! val isGreen = true!
}!
case class MyFavoriteFruit(name: String) extends
GreenApple(name) with Size {!
! def size = "very big"!
}!
MyFavoriteFruit("smith")
Scala in a nutshell
✤ Statically typed + type inference.!
✤ Immutability: val vs var . !
✤ Built-in support for better equals, hashCode and
toString in case classes.!
✤ Object Oriented: no primitives, classes, inheritance,
traits mix-ins.
Part 1 (spot part 2 for other Scala features)
See you next part! Meanwhile..
✤ Functional Programming Principles 

with Martin Odersky:

https://www.coursera.org/course/progfun!
✤ Learn Scala for Java Developers by Toby Weston:
http://www.amazon.com/Learn-Scala-Java-
Developers-Weston-ebook/dp/B00WIQKR9I!
✤ How to learn Scala by BoldRadius: 

http://guides.co/guide/how-to-learn-scala

More Related Content

PDF
Scala Workshop
Clueda AG
 
PDF
Scala in practice - 3 years later
patforna
 
KEY
Java to Scala: Why & How
Graham Tackley
 
PPTX
Pow séminaire "Divine Protection"
Alkauthar
 
PDF
Partial Functions in Scala
BoldRadius Solutions
 
PPTX
Paul Partlow Highlighted Portfolio
Paul Partlow
 
PDF
Taste of korea
Marta Garcia Trincado
 
PPTX
Value Classes in Scala | BoldRadius
BoldRadius Solutions
 
Scala Workshop
Clueda AG
 
Scala in practice - 3 years later
patforna
 
Java to Scala: Why & How
Graham Tackley
 
Pow séminaire "Divine Protection"
Alkauthar
 
Partial Functions in Scala
BoldRadius Solutions
 
Paul Partlow Highlighted Portfolio
Paul Partlow
 
Taste of korea
Marta Garcia Trincado
 
Value Classes in Scala | BoldRadius
BoldRadius Solutions
 

Viewers also liked (20)

PDF
Functional Programming - Worth the Effort
BoldRadius Solutions
 
PDF
Empirics of standard deviation
Adebanji Ayeni
 
PDF
What Are For Expressions in Scala?
BoldRadius Solutions
 
PDF
String Interpolation in Scala | BoldRadius
BoldRadius Solutions
 
PPTX
Presentation1
Adlu Panser Brutal
 
PDF
Code Brevity in Scala
BoldRadius Solutions
 
PPTX
Test
DDgmorrison1
 
PDF
Scala: Collections API
BoldRadius Solutions
 
PDF
Pattern Matching in Scala
BoldRadius Solutions
 
PPTX
Curriculum
thipik
 
PPTX
Cold drawn guide rail, Elevator guide Rail India
N Liftee
 
PDF
Scala Days Highlights | BoldRadius
BoldRadius Solutions
 
PPT
Earth moon 1
TrapQveen Mia
 
PDF
Punishment Driven Development #agileinthecity
Louise Elliott
 
PDF
Scala in Practice
Francesco Usai
 
PDF
Immutability in Scala
BoldRadius Solutions
 
PDF
How You Convince Your Manager To Adopt Scala.js in Production
BoldRadius Solutions
 
PDF
scientific method and the research process
Adebanji Ayeni
 
PDF
Scala vs Java 8 in a Java 8 World
BTI360
 
PPTX
GSLV MARK 3
APOORVA
 
Functional Programming - Worth the Effort
BoldRadius Solutions
 
Empirics of standard deviation
Adebanji Ayeni
 
What Are For Expressions in Scala?
BoldRadius Solutions
 
String Interpolation in Scala | BoldRadius
BoldRadius Solutions
 
Presentation1
Adlu Panser Brutal
 
Code Brevity in Scala
BoldRadius Solutions
 
Scala: Collections API
BoldRadius Solutions
 
Pattern Matching in Scala
BoldRadius Solutions
 
Curriculum
thipik
 
Cold drawn guide rail, Elevator guide Rail India
N Liftee
 
Scala Days Highlights | BoldRadius
BoldRadius Solutions
 
Earth moon 1
TrapQveen Mia
 
Punishment Driven Development #agileinthecity
Louise Elliott
 
Scala in Practice
Francesco Usai
 
Immutability in Scala
BoldRadius Solutions
 
How You Convince Your Manager To Adopt Scala.js in Production
BoldRadius Solutions
 
scientific method and the research process
Adebanji Ayeni
 
Scala vs Java 8 in a Java 8 World
BTI360
 
GSLV MARK 3
APOORVA
 
Ad

Similar to Why Not Make the Transition from Java to Scala? (20)

PDF
Scala - core features
Łukasz Wójcik
 
PDF
Introduction to Scala : Clueda
Andreas Neumann
 
PDF
Scala: Object-Oriented Meets Functional, by Iulian Dragos
3Pillar Global
 
PDF
Getting Started With Scala
Meetu Maltiar
 
PDF
Scala.pdf
ssuser155dbc1
 
PDF
Scala for Java Developers (Silicon Valley Code Camp 13)
Ramnivas Laddad
 
PPTX
Scala for curious
Tim (dev-tim) Zadorozhniy
 
PPTX
Scala intro for Java devs 20150324
Erik Schmiegelow
 
PDF
Meet scala
Wojciech Pituła
 
PDF
Stepping Up : A Brief Intro to Scala
Derek Chen-Becker
 
PPTX
Intro to Scala
manaswinimysore
 
PPTX
Scala Intro
Alexey (Mr_Mig) Migutsky
 
PPTX
Scala - The Simple Parts, SFScala presentation
Martin Odersky
 
PDF
BCS SPA 2010 - An Introduction to Scala for Java Developers
Miles Sabin
 
PDF
An Introduction to Scala for Java Developers
Miles Sabin
 
PPTX
Taxonomy of Scala
shinolajla
 
PDF
Scala, just a better java?
Giampaolo Trapasso
 
PDF
A Brief Introduction to Scala for Java Developers
Miles Sabin
 
PDF
Miles Sabin Introduction To Scala For Java Developers
Skills Matter
 
PPTX
Why Scala is the better Java
Thomas Kaiser
 
Scala - core features
Łukasz Wójcik
 
Introduction to Scala : Clueda
Andreas Neumann
 
Scala: Object-Oriented Meets Functional, by Iulian Dragos
3Pillar Global
 
Getting Started With Scala
Meetu Maltiar
 
Scala.pdf
ssuser155dbc1
 
Scala for Java Developers (Silicon Valley Code Camp 13)
Ramnivas Laddad
 
Scala for curious
Tim (dev-tim) Zadorozhniy
 
Scala intro for Java devs 20150324
Erik Schmiegelow
 
Meet scala
Wojciech Pituła
 
Stepping Up : A Brief Intro to Scala
Derek Chen-Becker
 
Intro to Scala
manaswinimysore
 
Scala - The Simple Parts, SFScala presentation
Martin Odersky
 
BCS SPA 2010 - An Introduction to Scala for Java Developers
Miles Sabin
 
An Introduction to Scala for Java Developers
Miles Sabin
 
Taxonomy of Scala
shinolajla
 
Scala, just a better java?
Giampaolo Trapasso
 
A Brief Introduction to Scala for Java Developers
Miles Sabin
 
Miles Sabin Introduction To Scala For Java Developers
Skills Matter
 
Why Scala is the better Java
Thomas Kaiser
 
Ad

More from BoldRadius Solutions (8)

PDF
Introduction to the Typesafe Reactive Platform
BoldRadius Solutions
 
PDF
Towards Reliable Lookups - Scala By The Bay
BoldRadius Solutions
 
PDF
Introduction to the Actor Model
BoldRadius Solutions
 
PPTX
Domain Driven Design Through Onion Architecture
BoldRadius Solutions
 
PDF
What are Sealed Classes in Scala?
BoldRadius Solutions
 
PDF
How To Use Higher Order Functions in Scala
BoldRadius Solutions
 
PDF
Scala Days 2014: Pitching Typesafe
BoldRadius Solutions
 
PDF
Demonstrating Case Classes in Scala
BoldRadius Solutions
 
Introduction to the Typesafe Reactive Platform
BoldRadius Solutions
 
Towards Reliable Lookups - Scala By The Bay
BoldRadius Solutions
 
Introduction to the Actor Model
BoldRadius Solutions
 
Domain Driven Design Through Onion Architecture
BoldRadius Solutions
 
What are Sealed Classes in Scala?
BoldRadius Solutions
 
How To Use Higher Order Functions in Scala
BoldRadius Solutions
 
Scala Days 2014: Pitching Typesafe
BoldRadius Solutions
 
Demonstrating Case Classes in Scala
BoldRadius Solutions
 

Recently uploaded (20)

PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PPTX
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
Protecting the Digital World Cyber Securit
dnthakkar16
 

Why Not Make the Transition from Java to Scala?

  • 1. Part 1 Scala for … you ? Katrin Shechtman, Senior Software Engineer at BoldRadius
  • 2. 01 Who am I? ✤ C —> C++ —> Java —> Scala! ✤ https://ca.linkedin.com/in/ katrinshechtman! ✤ https://github.com/katrinsharp! ✤ @katrinsh! ✤ [email protected] m
  • 3. Who are you? Feeling about Scala Java Developer DBA DevOps/ SysAdmin ETL Engineer I don’t like it! ?? ?? ?? ?? I don’t really care ?? ?? ?? ?? I’m curios to know more ?? ?? ?? ?? I’m totally in with it ?? ?? ?? ??
  • 4. Let’s talk about Java! Who is on with Java 8? Lambdas? There will be some code examples using Java 8, 
 but don’t worry, its knowledge is only nice to have 
 for this presentation.
  • 5. String greeting = "Hello World"; –There are so many things that compiler and I know!
  • 6. String greeting = "Hello World"; –We both know that it is String, what else could it be?
  • 7. greeting = "Hello World"; –Each of us also knows where the line ends..
  • 8. greeting = "Hello World" .. Nice..! But it is too simplistic. ! What about something beefy.. generics? –The crowd
  • 9. class SpecialId {! ! public String id;! ! public SpecialId(String id) {! ! ! this.id = id; ! ! }! }
 List<SpecialId> list = new LinkedList<SpecialId>();
 list.add(new SpecialId("1234")); –Doesn’t compiler know that it is a list of (at least) SpecialIds?
  • 10. Why not:! list = List<SpecialId>()! or if you populate it right away:! list = List(new SpecialId("1234")) – Good question, heh?
  • 11. greeting = "Hello World"! list = List(new SpecialId("1234")) –So far so good. What about SpecialId?
  • 12. class SpecialId {! ! public String id;! ! public SpecialId(String id) {! ! ! this.id = id; ! ! }! } –What if we could just let compiler know what members the class has and compiler will do the rest?
  • 13. class SpecialId(String id)! id = SpecialId("1234") –Remember the compiler knows that id is type of SpecialId
  • 14. greeting = "Hello World"! class SpecialId(String id)! list = List(new SpecialId("1234")) –Much more concise. What else?
  • 15. class Service(String name)! class Signup(SpecialId id, Service service)! list = List<Signup>() //populated somewhere else –How to get map of users per service?
  • 16. ✤ ol’ loop over iterator. ! ✤ Java 8 lambdas: 
 Map<Service, List<Signup>> m = list.stream()
 .collect(Collectors.groupingBy((signup) -> signup.service)); How to get map of users per service?
  • 17. Map<Service, List<Signup>> m = list.stream()
 .collect(Collectors.
 groupingBy((signup) -> signup.service)); –What really matters here is collection (list), action (grouping by) and mapping function.
  • 18. So why not to focus on what really matters?! m = list.groupingBy(signup -> signup.service) –Why not?
  • 19. greeting = "Hello World"! class SpecialId(String id)! list = List(new SpecialId(“1234"))! m = list.groupingBy(signup -> signup.service) –This looks like more succinct language syntax.
  • 20. Welcome to Scala - JavaVM based and functional language val greeting = "Hello World"! case class SpecialId(String id)! case class Signup(id: SpecialId, service: Service)! val signupList = 
 List(Signup(SpecialId("1234"), Service("service1")), …)! val m = signupList.groupBy(signup => signup.service)
  • 21. Scala in a nutshell ✤ Statically typed + type inference.! ✤ Immutability: val vs var . ! ✤ Built-in support for better equals, hashCode and toString in case classes.! ✤ Object Oriented: no primitives, classes, inheritance, traits mix-ins. Part 1 (spot part 2 for other Scala features)
  • 22. Statically typed w/ type inference ✤ Statically typed:
 val shouldBeString: String = 12 
 //type mismatch; found : Int(12) required: String
 def reminder(fraction: Int, denom: Int): Int = {
 fraction % denom
 } ! ✤ Type inference:
 val willBeInt = 12
 def reminder(fraction: Int, denom: Int) = fraction % denom
  • 23. Scala in a nutshell ✤ Statically typed + type inference.! ✤ Immutability: val vs var . ! ✤ Built-in support for better equals, hashCode and toString in case classes.! ✤ Object Oriented: no primitives, classes, inheritance, traits mix-ins. Part 1 (spot part 2 for other Scala features)
  • 24. Immutability ✤ Mutable vs immutable:
 val str1 = "immutable string"
 var str2 = "I can change"
 str1 = "Compilation error..." //reassignment to val
 str2 = "Now I'm different, no problem”! ✤ Mutable variable vs mutable collection:
 var mutableList = List("1", "2")
 mutableList = mutableList :+ "3"
 val mutableList2 = MutableList("1", "2")
 mutableList2 += “3"! ✤ Everything is expression:
 val isSomething = if(cond) true else false
  • 25. Scala in a nutshell ✤ Statically typed + type inference.! ✤ Immutability: val vs var . ! ✤ Built-in support for better equals, hashCode and toString in case classes.! ✤ Object Oriented: no primitives, classes, inheritance, traits mix-ins. Part 1 (spot part 2 for other Scala features)
  • 26. Remember Signup case class? ✤ toString():
 println(Signup(SpecialId("1"), Service("s1")))
 will print Signup(SpecialId(1),Service(s1))! ✤ equals(): 
 val signup = Signup(SpecialId("1"), Service(“s1"))
 val signup2 = Signup(SpecialId("1"), Service("s1"))
 signup == signup2 // will return true
  • 27. Scala in a nutshell ✤ Statically typed + type inference.! ✤ Immutability: val vs var . ! ✤ Built-in support for better equals, hashCode and toString in case classes.! ✤ Object Oriented: no primitives, classes, inheritance, traits mix-ins. Part 1 (spot part 2 for other Scala features)
  • 28. Object Oriented ✤ No primitives: Int, Boolean etc! ✤ Traits - interfaces with methods! ✤ Classes and case classes! ✤ Single inheritance, multiple mix-ins
  • 29. trait Fruit {! ! def isGreen: Boolean! ! def isLowCalories = false! } ! trait Size {! ! def size: String! } ! trait Apple extends Fruit {! ! val isLowCalories = isGreen! } ! class GreenApple(name: String) extends Apple {! ! val isGreen = true! }! case class MyFavoriteFruit(name: String) extends GreenApple(name) with Size {! ! def size = "very big"! }! MyFavoriteFruit("smith")
  • 30. Scala in a nutshell ✤ Statically typed + type inference.! ✤ Immutability: val vs var . ! ✤ Built-in support for better equals, hashCode and toString in case classes.! ✤ Object Oriented: no primitives, classes, inheritance, traits mix-ins. Part 1 (spot part 2 for other Scala features)
  • 31. See you next part! Meanwhile.. ✤ Functional Programming Principles 
 with Martin Odersky:
 https://www.coursera.org/course/progfun! ✤ Learn Scala for Java Developers by Toby Weston: http://www.amazon.com/Learn-Scala-Java- Developers-Weston-ebook/dp/B00WIQKR9I! ✤ How to learn Scala by BoldRadius: 
 http://guides.co/guide/how-to-learn-scala