Introduction
Introductory Matter
Why I Wrote This Book
Who This Book is For
Goals, Part 1: Soft Goals
Goals, Part 2: Concrete Goals
Goals, Part 3: A Disclaimer
Golden Rule: Question Everything
Rules for Programming in This Book
One Rule for Reading This Book
Functional Programming Background
What is Functional Programming?
What is This “Lambda” You Speak Of?
Benefits of FP
Disadvantages of FP
The Great FP Terminology Barrier
The Definition of “Pure Function”
Grandma’s Cookies
Benefits of Pure Functions
Pure Functions and I/O
Pure Function Signatures Tell All
Functional Programming is Like Algebra
Expression-Oriented Programming
Functional Programming is Like Unix Pipelines
Functional Programming in Scala
Functions Are Variables, Too
Using Methods As If They Were Functions
How to Write Scala Functions That Take Functions as Input Parameters
How to Write A map Function
How To Use By-Name Parameters
How to Write and Use Scala Functions That Have Multiple Parameter Groups
Partially-Applied Functions (and Currying)
Recursion: Introduction
Recursion: Motivation
Recursion: Lists
Recursion: Sum
Recursion: Unwinding
Recursion: Visualizing Unwinding
Recursion: Conversation
Recursion: Thinking in Recursion
Recursion: JVM Stacks and Frames
Recursion: JVM Stacks and Frames, Part 2
Recursion: Tail Recursion
A First Look at “State”
A Functional Game (With a Little Bit of State)
A Quick Review of Case Classes
Scala/FP Idiom: Update as You Copy, Don’t Mutate
Summary
About
Published with GitBook
Functional Programming in Scala
Functional Programming in Scala
This section contains introductory lessons on Scala-specific functional programming features.
results matching "
"
No results matching "
"