Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Functional Programming: A PragPub Anthology
About the Pragmatic Bookshelf
Table of Contents
Early Praise for Functional Programming: A PragPub Anthology
Introduction
Acknowledgements
Pa rt 1 The Functional Paradigm
Chapter 1: Functional Programming Is Big Again
We’ve Seen This Movie Before
New Arguments for Functional Programming
Chapter 2: Functional Thinking for the Imperative Mind
It’s About Functions
It’s About Immutability
It’s a Way of Thinking
Part 2: Scala: A Hybrid Language
Chapter 3: Scala and Functional Style
Functional Purity
Higher-Order Functions
A Simple Example
A Practical Example
What About Debugging and Performance?
Chapter 4: Working with Scala Collections
Immutable Collections
Mutable Collections
Lazy Collections
Chapter 5: Creating Higher-Order Functions in Scala
Creating a Higher-Order Function
Multiple Parameter Lists
Function Values and the Loan Pattern
Part 3: Clojure: The New Lisp
Chapter 6: An Interview with Rich Hickey
Why Clojure?
The Infrastructure
Compared to What?
Chapter 7: Getting Clojure: Why Lisp Still Matters
The REPL
Vectors and Keywords
Macros
Chapter 8: Identity, Value, and State in Clojure
The Object-Oriented Model
The Clojure Model
Chapter 9: Concurrent Programming in Clojure
A "Simple" Concurrent Programming Problem
Clojure’s Solution
Part 4: Elixir: Making Programming Fun Again
Chapter 10: Patterns and Transformations in Elixir
Pattern Matching
Pattern Matching Structured Data
Pattern Matching and Functions
Transformation Is Job #1
Chapter 11: Getting Functional with Elixir
Anonymous Functions
Named Functions
A Practical Example
Refactor to Functional Style
What’s Different About This Code
Chapter 12: Getting Parallel with Elixir
The Actor Model
Actors and Elixir
Messages
Monitoring Your Processes
A Final Example
Concurrency Is the Core of Elixir
Part 5: Haskell: The Researcher’s Playground
Chapter 13: Functional Thinking and Haskell
What It’s All About
A Quick Exercise
Data Types Are Cheap
Pattern Matching
Recursion, Control, and Higher-Order Function s
Further Features
Chapter 14: Haskell Hands-On
One Step at a Time
Generating Candidates
Dictionary Filtering
Breadth-First Searching
Using the Search
Performance and Optimization
Part 6: Swift: Functional Programming for Mobile Apps
Chapter 15: Swift: What You Need to Know
Hello, Swift!
Functional Swift
Chapter 16: Functional Thinking in Swift
Avoid Nil, Unless You Mean It
Avoid Mutable State
Use Higher-Order Functions
Part 7: Going Deeper
Chapter 17: Protocols in Swift vs. Ruby and Elixir
The Problem with Extensions
The Case for Protocols
Protocols and Extensions
Chapter 18: Pattern Matching in Scala
Counting Coins
Matching All the Things
Using Extractions
Chapter 19: Concurrency in Scala
Using Parallel Collections
Knowing When to Use Concurrency
Revisiting an Earlier Example
Chapter 20: Clojure’s Exceptional Handling of Exceptions
A Simple Example
The Problem with Exceptions
A Solution: Conditions
Make Life Simple for Your Callers
Laziness and Errors
Chapter 21: A Testing Framework for Elixir
Investing in Testing
One Experiment, Several Measurements
Optimizing Setup with TrueStory
Condense and Combine the Measurements
Controlling Setup Repetition with Nested Cont exts
Controlling Setup Repetition with Story Pipes
Chapter 22: Building Test Data with Elixir
The Typical Approaches
Beautiful Data for Beautiful Tests
Registering Templates and Prototypes with For ge
Instantiating Template Entries
Mutual Attributes and Having
Creating Structs
Creating Custom Entities
Customizing Persistence
Chapter 23: Haskell’s Type System
TL;DR
What Are Types For?
A Concrete Example: Sorting
The Language of Haskell’s Type System
Type Inference and Type Checking
Some Examples
Comfort Break
Interfaces and Type Classes
Some Real-World Examples with Interfaces
Pros and Cons—the 80/20 Rule
Beyond Haskell: Dependent Types
Propositions Are Types, and Proofs Are Progra ms
Another Look at Sorting
Back to Earth
Chapter 24: A Haskell Project: Testing Native Code
Our Native Code
Our Model
A Brief Introduction to Haskell’s FFI
Wrapping Our Native Code in Haskell
Experimenting with GHCi
A Brief Introduction to QuickCheck
Writing an Equivalence Property
Defect Smashing
Chapter 25: The Many Faces of Swift Functions
Anatomy of Swift Functions
Calling All Functions
Calling on Methods
Instance Methods Are Curried Functions
Init: A Special Note
Fancy Parameters
Access Controls
Fancy Return Types
Nested Functions
Chapter 26: A Functional Approach to Lua
First-Class Functions in Lua
Recursion in Lua
Building with Functional Primitives
A Simple Game Animation
Appendix 1: Meet the Authors
Aaron Bedra
Michael Bevilacqua-Linn
Paul Callaghan
Josh Chisholm
Mark Chu-Carroll
Stuart Halloway
Rich Hickey
Tony Hillerson
Natasha Murashev
Venkat Subramaniam
Bruce Tate
Dave Thomas
José Valim
Bibliography
You May Be Interested In…
← Prev
Back
Next →
← Prev
Back
Next →