My Account Log in

2 options

Functional programming : a PragPub anthology : exploring Clojure, Elixir, Haskell, Scala, and Swift / by Michael Swaine, and the PragPub writers.

Ebook Central College Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Swaine, Michael, author.
Series:
Pragmatic programmers.
Pragmatic Programmers
Language:
English
Subjects (All):
Functional programming (Computer science).
Clojure (Computer program language).
Elixir (Computer program language).
Physical Description:
1 online resource (263 pages) : illustrations.
Edition:
1st edition
Other Title:
Exploring Clojure, Elixir, Haskell, Scala, and Swift
Place of Publication:
Raleigh, North Carolina : Pragmatic Programmers Bookshelf, 2017.
System Details:
text file
Summary:
Explore functional programming and discover new ways of thinking about code. You know you need to master functional programming, but learning one functional language is only the start. In this book, through articles drawn from PragPub magazine and articles written specifically for this book, you'll explore functional thinking and functional style and idioms across languages. Led by expert guides, you'll discover the distinct strengths and approaches of Clojure, Elixir, Haskell, Scala, and Swift and learn which best suits your needs. Contributing authors: Rich Hickey, Stuart Halloway, Aaron Bedra, Michael Bevilacqua-Linn, Venkat Subramaniam, Paul Callaghan, Jose Valim, Dave Thomas, Natasha Murashev, Tony Hillerson, Josh Chisholm, and Bruce Tate. Functional programming is on the rise because it lets you write simpler, cleaner code, and its emphasis on immutability makes it ideal for maximizing the benefits of multiple cores and distributed solutions. So far nobody's invented the perfect functional language - each has its unique strengths. In Functional Programming: A PragPub Anthology , you'll investigate the philosophies, tools, and idioms of five different functional programming languages. See how Swift, the development language for iOS, encourages you to build highly scalable apps using functional techniques like map and reduce. Discover how Scala allows you to transition gently but deeply into functional programming without losing the benefits of the JVM, while with Lisp-based Clojure, you can plunge fully into the functional style. Learn about advanced functional concepts in Haskell, a pure functional language making powerful use of the type system with type inference and type classes. And see how functional programming is becoming more elegant and friendly with Elixir, a new functional language built on the powerful Erlang base.The industry has been embracing functional programming more and more, driven by the need for concurrency and parallelism. This collection of articles will lead you to mastering the functional approach to problem solving. So put on your explorer's hat and prepare to be surprised. The goal of exploration is always discovery. What You Need: Familiarity with one or more programming languages.
Contents:
Cover
Table of Contents
Introduction
Acknowledgements
Part I-The Functional Paradigm
1. Functional Programming Is Big Again
We've Seen This Movie Before
New Arguments for Functional Programming
2. Functional Thinking for the Imperative Mind
It's About Functions
It's About Immutability
It's a Way of Thinking
Part II-Scala: A Hybrid Language
3. Scala and Functional Style
Functional Purity
Higher-Order Functions
A Simple Example
A Practical Example
What About Debugging and Performance?
4. Working with Scala Collections
Immutable Collections
Mutable Collections
Lazy Collections
5. Creating Higher-Order Functions in Scala
Creating a Higher-Order Function
Multiple Parameter Lists
Function Values and the Loan Pattern
Part III-Clojure: The New Lisp
6. An Interview with Rich Hickey
Why Clojure?
The Infrastructure
Compared to What?
7. Getting Clojure: Why Lisp Still Matters
The REPL
Vectors and Keywords
Macros
8. Identity, Value, and State in Clojure
The Object-Oriented Model
The Clojure Model
9. Concurrent Programming in Clojure
A "Simple" Concurrent Programming Problem
Clojure's Solution
Part IV-Elixir: Making Programming Fun Again
10. Patterns and Transformations in Elixir
Pattern Matching
Pattern Matching Structured Data
Pattern Matching and Functions
Transformation Is Job #1
11. Getting Functional with Elixir
Anonymous Functions
Named Functions
Refactor to Functional Style
What's Different About This Code
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 V-Haskell: The Researcher's Playground
13. Functional Thinking and Haskell.
What It's All About
A Quick Exercise
Data Types Are Cheap
Recursion, Control, and Higher-Order Functions
Further Features
14. Haskell Hands-On
One Step at a Time
Generating Candidates
Dictionary Filtering
Breadth-First Searching
Using the Search
Performance and Optimization
Part VI-Swift: Functional Programming for Mobile Apps
15. Swift: What You Need to Know
Hello, Swift!
Functional Swift
16. Functional Thinking in Swift
Avoid Nil, Unless You Mean It
Avoid Mutable State
Use Higher-Order Functions
Part VII-Going Deeper
17. Protocols in Swift vs. Ruby and Elixir
The Problem with Extensions
The Case for Protocols
Protocols and Extensions
18. Pattern Matching in Scala
Counting Coins
Matching All the Things
Using Extractions
19. Concurrency in Scala
Using Parallel Collections
Knowing When to Use Concurrency
Revisiting an Earlier Example
20. Clojure's Exceptional Handling of Exceptions
The Problem with Exceptions
A Solution: Conditions
Make Life Simple for Your Callers
Laziness and Errors
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 Contexts
Controlling Setup Repetition with Story Pipes
22. Building Test Data with Elixir
The Typical Approaches
Beautiful Data for Beautiful Tests
Registering Templates and Prototypes with Forge
Instantiating Template Entries
Mutual Attributes and Having
Creating Structs
Creating Custom Entities
Customizing Persistence
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 Programs
Another Look at Sorting
Back to Earth
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
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
26. A Functional Approach to Lua
First-Class Functions in Lua
Recursion in Lua
Building with Functional Primitives
A Simple Game Animation
A1. Meet the Authors
Bibliography
Index
- SYMBOLS -
- DIGITS -
- A -
- B -
- C -
- D -
- E -
- F -
- G -
- H -
- I -
- J -
- K -
- L -
- M -
- N -
- O -
- P -
- Q -
- R -
- S -
- T -
- U -
- V -
- W -
- X -
- Z -.
Notes:
Description based on online resource; title from PDF title page (EBC, viewed March 14, 2018).
Includes bibliographical references and index.
ISBN:
9781680502756
1680502751
9781680503593
1680503596
9781680503586
1680503588
9781680502336
1680502336
OCLC:
1004966434

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account