Scala Methods and Functions

Scala is emerging as a popular choice for working with large datasets and frameworks such as Spark. This course will teach you about Scala's support for first-class and higher-order functions and the differences between methods and functions.
Course info
Level
Intermediate
Updated
Aug 19, 2020
Duration
3h 15m
Table of contents
Course Overview
Getting Started with Functions and Methods
Understanding and Implementing Functions
Understanding and Implementing Methods
Dealing with Exceptions and Missing Values
Description
Course info
Level
Intermediate
Updated
Aug 19, 2020
Duration
3h 15m
Your 10-day individual free trial includes:

Expert-led courses

Keep up with the pace of change with thousands of expert-led, in-depth courses.
Description

Working with Big Data these days increasingly requires an understanding of functional programming constructs, because of how easily functional code can be distributed. Scala is a general-purpose programming language that runs on the JVM and supports both functional and object-oriented programming paradigms.

In this course, Scala Methods and Functions, you’ll learn to utilize those aspects of Scala that are specific to the functional programming paradigm.

First, you'll see how variables with different type modifiers are assigned and evaluated and you’ll understand the differences between Scala val, var, lazy val, and def keywords.

Next, you’ll discover the attributes of first-class functions, and the use of higher-order functions and partial functions in order to simplify code design.

Next, you’ll learn how to harness the power of features for Scala methods such as currying, recursion, named and positional arguments, and varargs.

Finally, you'll learn how to deal with missing values and errors in Scala and work with functional error handling idioms such as Try-Success-Failure, Option-Some-None, and Either-Right-Left.

When you’re finished with this course, you’ll have the skills and knowledge of functions and methods in Scala needed to write correct, concise, yet easily understandable code that combines the power of the functional programming paradigm with a strong static type system.

About the author
About the author

A problem solver at heart, Janani has a Masters degree from Stanford and worked for 7+ years at Google. She was one of the original engineers on Google Docs and holds 4 patents for its real-time collaborative editing framework.

More from the author
Summarizing Data and Deducing Probabilities
Intermediate
2h 50m
Jul 8, 2021
More courses by Janani Ravi
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
[Autogenerated] Hi, My name is Jenny Ravi, and welcome to the scores on Scala methods and functions a little about myself. I have a master's degree in electrical engineering from Stanford and have worked at companies such as Microsoft, Google and Flip Card. I currently work on my own startup lunatic on a studio for high quality with your content in this course, you learn to utilize those aspects of Scala that are specific to the functional programming battery. First, you'll see how variables with different type modifiers are assigned and evaluated, and you'll understand the differences between the scholar Val Bar lease, evil and death keyboards. You'll also explore functions and methods on the differences in how these are defined and invoked. Next, you'll discover the attributes of first class functions on the use of higher order functions and partial functions. In order to simplify code design, you'll work that function Little's on the placeholder syntax and learn how functions can be invoked using expression blocks. Next, you learn how to harness the power of scholar methods, using features such as curry, a ____ Ocean named and position arguments on variable arguments. You'll see how the tail precaution optimization. Scholar makes records of methods as performance as iterated computations. Finally, you learn how to deal with missing values and errors and scholar and work with functional edda handling idiom suggested. Try success, failure option some none on the either. Right. Left. When you're finished with this course, you'll have the skills and knowledge of functions and methods, and scholar needed to write correct, concise yet understandable court that combines the power of the functional programming paradigm with a strong static type system.