ScalaIntroFunctionalProgramming

Download Report

Transcript ScalaIntroFunctionalProgramming

Scala Topics –
Starting Functional Programming
CMSC 331
Three Parts to this Unit
1.
2.
3.
Look over the corrections to the case class lecture
see
http://cs.umbc.edu/~vick/331/online/Scala/CaseCla
ssesPatterns/0_CaseClassesIntro.ppt
View the summary lectures of what you should
have gotten already from the text and in class (see
next slide)
View the lecture on Using Functional Programming
and Patterns see
①
http://www.cs.umbc.edu/~vick/331/online/Scala/CaseClas
sesPatterns/1_HigherOrderFunctions.swf
②
http://www.cs.umbc.edu/~vick/331/online/Scala/
CaseClassesPatterns/2_sum-example.swf
Part 2: What You Should (Already) Know
Scala is FP and OOP see
http://screencast.com/t/uo7MLP84
 Scala FP small examples see
http://screencast.com/t/kgd2yCtjmO
 Scala Language Design Philosophy see
http://screencast.com/t/NjXObtQtL31u
 Scala class example to illustrate Scala’s
expressiveness
http://screencast.com/t/IvB3DVwiFKh

Part 2: Continued
Some New(ish) Constructs
Pattern Matching see
http://screencast.com/t/B0iNjiHFi
 Scala - Functions as Objects see
http://screencast.com/t/pop8QjOLxXSP
