Functional Programming Principles in Scala

4.8
4,845 ratings
1,030 reviews

Course 1 of 5 in the Functional Programming in Scala Specialization

Functional programming is becoming increasingly widespread in industry. This trend is driven by the adoption of Scala as the main programming language for many applications. Scala fuses functional and object-oriented programming in a practical package. It interoperates seamlessly with both Java and Javascript. Scala is the implementation language of many important frameworks, including Apache Spark, Kafka, and Akka. It provides the core infrastructure for sites such as Twitter, Tumblr and also Coursera. In this course you will discover the elements of the functional programming style and learn how to apply them usefully in your daily programming tasks. You will also develop a solid foundation for reasoning about functional programs, by touching upon proofs of invariants and the tracing of execution symbolically. The course is hands on; most units introduce short programs that serve as illustrations of important concepts and invite you to play with them, modifying and improving them. The course is complemented by a series programming projects as homework assignments. Learning Outcomes. By the end of this course you will be able to: - understand the principles of functional programming, - write purely functional programs, using recursion, pattern matching, and higher-order functions, - combine functional programming with objects and classes, - design immutable data structures, - reason about properties of functions, - understand generic types for functional programs 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 using the command line.
Globe

curso 100% online

Comece imediatamente e aprenda em seu próprio cronograma.
SvgLevelIntermediate

Nível intermediário

Clock

Aprox. 20 horas restantes

Sugerido: 5 hours/week
CommentDots

English

Legendas: English, Korean, Serbian, French

Habilidades que você terá

Functional ProgrammingData StructureProblem SolvingObject-Oriented Programming
Globe

curso 100% online

Comece imediatamente e aprenda em seu próprio cronograma.
SvgLevelIntermediate

Nível intermediário

Clock

Aprox. 20 horas restantes

Sugerido: 5 hours/week
CommentDots

English

Legendas: English, Korean, Serbian, French

Syllabus - What you will learn from this course

1

Section
Clock
13 hours to complete

Getting Started + Functions & Evaluation

Get up and running with Scala on your computer. Complete an example assignment to familiarize yourself with our unique way of submitting assignments. In this week, we'll learn the difference between functional imperative programming. We step through the basics of Scala; covering expressions, evaluation, conditionals, functions, and recursion...
SvgReading
11 videos (Total 139 min), 8 readings, 4 quizzes
Video11 videos
Tools Setup for Linux22m
Tools Setup for Mac OS X21m
Tools Setup for Windows18m
Lecture 1.1 - Programming Paradigms14m
Lecture 1.2 - Elements of Programming14m
Lecture 1.3 - Evaluation Strategies and Termination4m
Lecture 1.4 - Conditionals and Value Definitions8m
Lecture 1.5 - Example: square roots with Newton's method11m
Lecture 1.6 - Blocks and Lexical Scope8m
Lecture 1.7 - Tail Recursion12m
SvgReading8 readings
Tools Setup (Please read)10m
Cheat Sheet10m
IntelliJ IDEA Tutorial10m
Eclipse Tutorial10m
SBT tutorial and Submission of Assignments (Please read)10m
Learning Resources10m
Scala Tutorial10m
Scala Style Guide10m
Quiz1 practice exercises
Learning check-in2m

2

Section
Clock
7 hours to complete

Higher Order Functions

This week, we'll learn about functions as first-class values, and higher order functions. We'll also learn about Scala's syntax and how it's formally defined. Finally, we'll learn about methods, classes, and data abstraction through the design of a data structure for rational numbers....
SvgReading
7 videos (Total 84 min), 2 quizzes
Video7 videos
Lecture 2.2 - Currying14m
Lecture 2.3 - Example: Finding Fixed Points10m
Lecture 2.4 - Scala Syntax Summary4m
Lecture 2.5 - Functions and Data11m
Lecture 2.6 - More Fun With Rationals15m
Lecture 2.7 - Evaluation and Operators16m

3

Section
Clock
7 hours to complete

Data and Abstraction

This week, we'll cover traits, and we'll learn how to organize classes into hierarchies. We'll cover the hierarchy of standard Scala types, and see how to organize classes and traits into packages. Finally, we'll touch upon the different sorts of polymorphism in Scala....
SvgReading
3 videos (Total 66 min), 2 quizzes
Video3 videos
Lecture 3.2 - How Classes Are Organized20m
Lecture 3.3 - Polymorphism21m

4

Section
Clock
8 hours to complete

Types and Pattern Matching

This week we'll learn about the relationship between functions and objects in Scala; functions *are* objects! We'll zoom in on Scala's type system, covering subtyping and generics, and moving on to more advanced aspects of Scala's type system like variance. Finally, we'll cover Scala's most widely used data structure, Lists, and one of Scala's most powerful tools, pattern matching....
SvgReading
7 videos (Total 117 min), 2 quizzes
Video7 videos
Lecture 4.2 - Functions as Objects8m
Lecture 4.3 - Subtyping and Generics15m
Lecture 4.4 - Variance (Optional)21m
Lecture 4.5 - Decomposition16m
Lecture 4.6 - Pattern Matching19m
Lecture 4.7 - Lists16m

5

Section
Clock
1 hour to complete

Lists

This week we dive into Lists, the most commonly-used data structure in Scala....
SvgReading
7 videos (Total 88 min)
Video7 videos
Lecture 5.2 - Pairs and Tuples10m
Lecture 5.3 - Implicit Parameters11m
Lecture 5.4 - Higher-Order List Functions14m
Lecture 5.5 - Reduction of Lists15m
Lecture 5.6 - Reasoning About Concat13m
Lecture 5.7 - A Larger Equational Proof on Lists9m

6

Section
Clock
8 hours to complete

Collections

After a deep-dive into Lists, this week we'll explore other data structures; vectors, maps, ranges, arrays, and more. We'll dive into Scala's powerful and flexible for-comprehensions for querying data....
SvgReading
6 videos (Total 99 min), 2 quizzes
Video6 videos
Lecture 6.2 - Combinatorial Search and For-Expressions13m
Lecture 6.3 - Combinatorial Search Example16m
Lecture 6.4 - Maps22m
Lecture 6.5 - Putting the Pieces Together20m
Conclusion4m
4.8
SvgDirectionSigns

27%

started a new career
Briefcase

83%

got a tangible career benefit from this course
Money

11%

got a pay increase or promotion

Top Reviews

By RSOct 9th 2016

Really good explanation by the instructor. Good assignments. The assignments gave a good insights into functional programming. I loved the way the problems were decomposed into neat smaller functions.

By SSJun 13th 2016

This course is the best You can find on functional programming with Scala. It's a rare opportunity to take a course from the creator of the language and learn all the important parts of the language.

Instructor

About École Polytechnique Fédérale de Lausanne

Frequently Asked Questions

  • Once you enroll for a Certificate, you’ll have access to all videos, quizzes, and programming assignments (if applicable). Peer review assignments can only be submitted and reviewed once your session has begun. If you choose to explore the course without purchasing, you may not be able to access certain assignments.

  • If you pay for this course, you will have access to all of the features and content you need to earn a Course Certificate. If you complete the course successfully, your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile. Note that the Course Certificate does not represent official academic credit from the partner institution offering the course.

  • Yes! Coursera provides financial aid to learners who would like to complete a course but cannot afford the course fee. To apply for aid, select "Learn more and apply" in the Financial Aid section below the "Enroll" button. You'll be prompted to complete a simple application; no other paperwork is required.

More questions? Visit the Learner Help Center