Description
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.
What you will learn
For Expressions and Monads
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.
Lazy Evaluation
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.
Type-Directed Programming
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).
Functions and State
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.





In fact, this is an inconsistent attempt of re-implementing previous FRP course from the same authors. FRP course had many issues about homework/lectures being poorly related, this one is even worse. This is very frustrating, as a topic itself is one of the most interesting ones in today’s software engineering.
It’s mixed from previous courses on Scala. Not coherent, many unrelated topics with little explanation of their importance and real-world use cases.
The course was still useful and with new information but I really found it lacking cohesion with the overall specialization and with its own content.
The mix of materials from different courses hurts the structure of this course.
A sharp decline in quality and cohesion from the Functional Programming Principles in Scala course. It may be worth enrolling just to hear Odersky’s elegant lecturing at work once again, but if you’re interested in the core concepts, I would highly recommend picking up a highly rated book instead.
The presented material wasn’t coherent for me, I didn’t walk away with knowledge of functional design principles for larger/complex software. The topics presented seems just a bunch of topics next to each other.
There wasn’t that much content to this course. I realise it was the result of some restructuring and the previous version might have been more complex, right now it seems very little content for the price.
Apart from the topics like Future and Stream, I haven’t found it very interesting. The part on the Digital Circuits for instance for me was not relevant, given that I studied micro-eletronics and engineering.
Should really have been included in the first part of the specialization. Exercises were also not demanding enough and did not cover enough of the material in the lectures
This course is evidently hacked together from pieces of other courses. Not nearly as well put together as the previous from the specialization which was excellent. The specialization could benefit from having this module reworked from scratch.
The videos referenced lectures that were not included in the course. Homework did not relate to material from the videos. Some of the videos contained little content.
Very boring and unorganized course. It feels like it is a mix of two older courses that no longer exist.
This almost made me feel like I was back in college, with those unbelievably boring lessons and project subjects from 30 years ago.
It is terrible compared to the first one: bad course structure, assignment mismatch, there is no mentioned of RxScala anywhere.
The 3rd and the 4th Week courses need to be looked at as the Assignments and the video lectures are not in sync and many videos are missing. The 1st 2 weeks are good.
The course starts well and has really good exercises, HOWEVER at weeks 3-4 the lectures lose their logical order, it feels like a collection of random lectures from other course syllabus that have been “reused” here.
Week 3 exercise has very little to do with the lectures, and week 4 lectures are even worse, martin says he’ll talk about 1 thing that is later not in the course, then we switch to someone else that talks about “things we’ve seen before” – which we haven’t!
Don’t get me wrong, you can still learn a lot from this and understand most of it, but it just feels very unprofessional, glad I’ve only audited this course and didn’t pay for it, if that was the case I would feel very disappointed
Mish-mash of everything. Disconnected lectures and assignments. Week4 is plain horrible – assembled from random lectures that refer to non-existing context. One hour of random lectures does a very bad job of introducing reactive programming.
It seems that this course may have been neglected and gotten stale/out of sync. Some of the did not match the lessons.
It seems that this course was partially updated, but it was not done in a seamlessly way. I think this course deserve a full remake, if possible with the same instructor all the time.
This course is really disjointed. Unlike the first course in Scala Functional Programming specialization, this course is stitched together from bits and pieces of other courses. The lectures make reference to other lessons that no longer appear in the course, and the assignments frequently have nothing to do with the lecture material.
Scala is so different from traditional imperative languages, such as C++, sometimes it looks like magic to me from its compact but powerful expression. The hard part is the way of thinking is different. This course is from the father of the language, he explained insights of many ideas well. The homework is hard, but doable, if you put in some efforts, you feel you gain a lot. I love Scala.
The 3rd and 4th week were clearly improved upon since the last reviews noted a sense of disorganisation: now they are well structured and fit in well with the overall course. The course as a whole is well balanced and interesting!
This module as the one before (for which Coursera doesn’t allow me to leave a review) is really “academic” like. That really means a lot of notion with no practical examples. Even the first module wasn’t really explaining scala, it already starts like you are supposed to know it already. While in the description it was depicted as a beginers-like course. For instance, the lectures talk about the argument “A” and then the assignment is about “Z^2”. One of the worst thing about the lectures is that you spend 20 minutes trying to understand a really complicated notion and then in the next minute he implements the same concept with less line of codes and also more optimised, so you have wasted all that time trying to understand an obsolete technique, why you didn’t show me the optimised way immediately?! Lectures of 15 minutes that could be resumed with an internet search of 3 minutes. Definitely a waste of money, I completed the first one hoping to understand more in this one but what I got was just a huge waste of time and money.
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.