
Learn Functional Programming with Elixir
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Elixir''s straightforward syntax and this guided tour give you a clean, simple path to learn modern functional programming techniques. No previous functional programming experience required! This book walks you through the right concepts at the right pace, as you explore immutable values and explicit data transformation, functions, modules, recursive functions, pattern matching, high-order functions, polymorphism, and failure handling, all while avoiding side effects. Don''t board the Elixir train with an imperative mindset! To get the most out of functional languages, you need to think functionally. This book will get you there.
Functional programming offers useful techniques for building maintainable and scalable software that solves today''s difficult problems. The demand for software written in this way is increasing - you don''t want to miss out. In this book, you''ll not only learn Elixir and its features, you''ll also learn the mindset required to program functionally. Elixir''s clean syntax is excellent for exploring the critical skills of using functions and concurrency.
Start with the basic techniques of the functional way: working with immutable data, transforming data in discrete steps, and avoiding side effects. Next, take a deep look at values, expressions, functions, and modules. Then extend your programming with pattern matching and flow control with case, if, cond, and functions. Use recursive functions to create iterations. Work with data types such as lists, tuples, and maps. Improve code reusability and readability with Elixir''s most common high-order functions. Explore how to use lazy computation with streams, design your data, and take advantage of polymorphism with protocols. Combine functions and handle failures in a maintainable way using Elixir features and libraries.
Learn techniques that matter to make code that lives harmoniously with the language.
What You Need:
You''ll need a computer and Elixir 1.4 or newer version installed. No previous functional programming or Elixir experience is required. Some experience with any programming language is recommended.
More details
Other editions
Additional editions

Content
- Cover
- Table of Contents
- Acknowledgments
- Introduction
- Is This Book for You?
- What's in This Book?
- Using Elixir
- Online Resources
- 1. Thinking Functionally
- Why Functional?
- Working with Immutable Data
- Building Programs with Functions
- Declaring Code
- Wrapping Up
- 2. Working with Variables and Functions
- Representing Values
- Executing Code and Generating a Result
- Binding Values in Variables
- Creating Anonymous Functions
- Naming Functions
- Wrapping Up
- 3. Using Pattern Matching to Control the Program Flow
- Making Two Things Match
- Unpacking Values from Various Data Types
- Control Flow with Functions
- Expanding Control with Guard Clauses
- Elixir Control-Flow Structures
- Wrapping Up
- 4. Diving into Recursion
- Surrounded by Boundaries
- Conquering Recursion
- Tail-Call Optimization
- Functions Without Borders
- Using Recursion with Anonymous Functions
- Wrapping Up
- 5. Using Higher-Order Functions
- Creating Higher-Order Functions for Lists
- Using the Enum Module
- Using Comprehensions
- Pipelining Your Functions
- Be Lazy
- Wrapping Up
- 6. Designing Your Elixir Applications
- Starting Your Project with Mix
- Designing Entities with Structs
- Using Protocols to Create Polymorphic Functions
- Creating Module Behaviours
- Wrapping Up
- 7. Handling Impure Functions
- Pure vs. Impure Functions
- Controlling the Flow of Impure Functions
- Trying, Rescuing, and Catching
- Handling Impure Functions with the Error Monad
- Using with
- Wrapping Up
- A1. Adding Rooms to the Game
- A2. Answers to Exercises
- Answers for Chapter 2, Working with Variables and Functions
- Answers for Chapter 3, Using Pattern Matching to Control the Program Flow
- Answers for Chapter 4, Diving into Recursion
- Answers for Chapter 5, Using Higher-Order Functions
- Bibliography
- Index
- - SYMBOLS -
- - A -
- - B -
- - C -
- - D -
- - E -
- - F -
- - G -
- - H -
- - I -
- - K -
- - L -
- - M -
- - N -
- - O -
- - P -
- - R -
- - S -
- - T -
- - U -
- - V -
- - W -
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.