When you enroll in this course, you'll also be enrolled in this Specialization.
Learn new concepts from industry experts
Gain a foundational understanding of a subject or tool
Develop job-relevant skills with hands-on projects
Earn a shareable career certificate
There are 5 modules in this course
In this course you will learn how to apply the functional programming style in the design of larger Scala applications. You'll get to know important new functional programming concepts, from lazy evaluation to structuring your libraries using monads. We'll work on larger and more involved examples, from state space exploration to random testing to discrete circuit simulators. You’ll also learn some best practices on how to write good Scala code in the real world. Finally, you will learn how to leverage the ability of the compiler to infer values from types.
Several parts of this course deal with the question how functional programming interacts with mutable state. We will explore the consequences of combining functions and state. We will also look at purely functional alternatives to mutable state, using infinite data structures or functional reactive programming.
Recommended background: You should have at least one year programming experience. Proficiency with Java or C# is ideal, but experience with other languages such as C/C++, Python, Javascript or Ruby is also sufficient. You should have some familiarity with using the command line. This course is intended to be taken after Functional Programming Principles in Scala: https://www.coursera.org/learn/progfun1.
We'll start by revisiting some concepts that we have learned from Principles of Functional Programming in Scala; collections, pattern matching, and functions. We'll then touch on for-comprehensions, a powerful way in Scala to traverse a list, process it, and return a new list. We'll see how to do queries with for-comprehensions as well as how the for-comprehension is "desugared" into calls to higher-order functions by the Scala compiler. Finally, we'll discuss what monads are, and how to verify that the monad laws are satisfied for a number of examples.
What's included
8 videos8 readings3 programming assignments
Show info about module content
8 videos•Total 76 minutes
Introduction•2 minutes
Week 1 Introduction•1 minute
Recap: Functions and Pattern Matching•12 minutes
Lecture 1.1 - Queries with For•6 minutes
Lecture 1.2 - Translation of For•7 minutes
Lecture 1.3 - Functional Random Generators•24 minutes
Lecture 1.4 - Monads•11 minutes
Lecture 1.5 - Exceptional Monads•13 minutes
8 readings•Total 75 minutes
Working on Assignments•5 minutes
Tools Setup (Please read)•10 minutes
Grading Policy•10 minutes
SBT tutorial and Submission of Assignments (Please read)•10 minutes
Cheat Sheet•10 minutes
Scala Style Guide•10 minutes
Learning Resources•10 minutes
Reactive Cheat Sheet•10 minutes
3 programming assignments•Total 540 minutes
Example Assignment•180 minutes
Quickcheck•180 minutes
Quickcheck•180 minutes
Lazy Evaluation
Module 2•7 hours to complete
Module details
This week we'll revisit performance issues caused by combinatorial search, and we'll discover an important concept in functional programming that can address these issues: laziness. We'll also learn a little bit about proofs on trees; in particular, we'll see how to extend structural induction to trees.
What's included
6 videos2 programming assignments
Show info about module content
6 videos•Total 69 minutes
Week 2 Intrduction•1 minute
Lecture 2.1 - Structural Induction on Trees•14 minutes
Lecture 2.2 - Lazy Lists•12 minutes
Lecture 2.3 - Lazy Evaluation•10 minutes
Lecture 2.4 - Computing with Infinite Sequences•12 minutes
Lecture 2.5 - Case Study: the Water Pouring Problem•20 minutes
2 programming assignments•Total 360 minutes
Bloxorz•180 minutes
Bloxorz•180 minutes
Type-Directed Programming
Module 3•9 hours to complete
Module details
This week, we’ll learn how to make the compiler write programs for us! We’ll see how the compiler can summon program fragments based on their type and how this mechanism can be used to implement a new form of polymorphism (type classes).
Lecture 3.2 - Using clauses and given instances•18 minutes
Lecture 3.3 - Type classes•14 minutes
Lecture 3.4 - Abstract algebra and type classes•9 minutes
Lecture 3.5 - Context passing•26 minutes
Lecture 3.6 - Implicit function types•10 minutes
5 readings•Total 50 minutes
Motivating Example•10 minutes
Type-Directed Programming•10 minutes
Type Classes•10 minutes
Conditional Implicit Definitions•10 minutes
Implicit Conversions•10 minutes
3 assignments•Total 30 minutes
Type-Directed Programming•0 minutes
Conditional Implicit Definitions•30 minutes
Implicit Conversions•0 minutes
2 programming assignments•Total 360 minutes
JSON Codecs•180 minutes
JSON Codecs•180 minutes
Functions and State
Module 4•1 hour to complete
Module details
This week, we'll learn about state and side-effects. Through a rich example, we'll learn programming patterns for managing state in larger programs. We'll also learn about for-loops and while-loops in Scala.
This week we'll learn a number of important programming patterns via examples, starting with the observer pattern, and then going on to functional reactive programming.
What's included
6 videos2 programming assignments
Show info about module content
6 videos•Total 50 minutes
Week 5 Introduction•1 minute
Lecture 5.1 - Imperative Event Handling: The Observer Pattern•8 minutes
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."
Learner reviews
4.5
3,137 reviews
5 stars
66.33%
4 stars
24.01%
3 stars
7.57%
2 stars
1.62%
1 star
0.44%
Showing 3 of 3137
E
ES
5·
Reviewed on Mar 17, 2018
Thank you for this exciting course! I did the FP in Scala course a few years ago and decided to do the full certification now. I am looking forward to the next courses in the specialisation.
H
HL
5·
Reviewed on Mar 5, 2017
Great experience with the assignments. Took some time to get understand all the course materials. Highly recommended. Still can learn a lot after reading fpins
A
AD
5·
Reviewed on Jul 2, 2021
Wonderful course by Martin Odersky himself. The content is awesome and the way Martin has explained the concepts in Scala 3 syntax and features is great. A course for every Scala developer.
When will I have access to the lectures and assignments?
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
What will I get if I subscribe to this Specialization?
When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
Is financial aid available?
Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.