kokolegorille

kokolegorille

Learn Functional Programming with Elixir (Pragprog)

by Ulisses Almeida

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.

Don’t forget you can get 35% off the ebook using the code ‘devtalk.com:023:

Most Liked Responses

AstonJ

AstonJ

Whoo hoo I finished it! Here’s…

My Review

I really enjoyed this book! I think it’s going to prove incredibly useful for those of us who are coming to Elixir as our first functional programming language. But before I go into the details, I want to say that this book reminded me that you should never judge a book by its cover!!

Why? Well when I first heard about this book I immediately thought it was going to be Elixir’s version of the Ruby book by Chris Pine, called Learn to Program (an amazing book btw!). But it’s not - this book goes much further down the rabbit hole! In fact, I reckon it could even drop ‘learn’ from the title and simply be called Functional Programming with Elixir. Having ‘learn’ in the title makes it sound as though it’s for newcomers to programming in general - but maybe that’s just because I’m aware of the aforementioned Ruby book which also happens to be published by PragProg.

For the same reason, I’m also glad I read this book after Programming Elixir and Elixir in Action. Because the focus of those books are the fundamentals of the Elixir language and OTP, and that’s why they cover them in great detail. The focus of this book however, is functional programming …with Elixir. So the aim of this book isn’t to teach you the ins and outs of Elixir and OTP, it’s to teach you the fundamentals of functional programming - and just so happens to be using Elixir, but, while also showcasing Elixir’s advantages in the area and how it approaches and tackles common problems using functional programming.

So this book is for you if Elixir is your first functional programming language or maybe even if it’s not, and you want to see how Elixir is functionally minded. It will go into detail about things like recursion - (which btw, is a deeper topic than I first thought!) for instance, just like in Elixir in Action where you build a genserver and supervisor from scratch using bare processes, here you build a Map function using recursion. I LOVE it when books do this, because it helps give you a much better understanding of what is going on and helps make things ‘click’.

If you still don’t think you need this book - here are some questions for you: Do you know functional concepts and terms such as Divide and Conquer, Decrease and Conquer, Unbounded Recursion, Pure Functions, Impure Functions, Higher Order Functions? Do you know what Map and Reduce are really doing under the hood? Do you know when to use Comprehensions or Monads or Try and Rescue/Throw or With? Or what about when to use Protocols or Module Behaviours? If not, this book will teach you, and much more!

I’m glad I read this book - and if you read it, I think you will be too!

Well done @ulissesalmeida, this book definitely fills a void and I think will prove very useful to a lot of people :023:

ulissesalmeida

ulissesalmeida

Author of Learn Functional Programming with Elixir

In Programming Elixir by Dave, he will guide you through all Elixir feature showing you some concepts of functional programming, concurrent programming, and testing. The book is for experienced developers. In Learn Functional Programming with Elixir by Ulisses (what me?), it will guide you only though functional concepts and show you Elixir. The book is for beginners, then a lot of examples will be step by step.

A good example is the “recursive functions” subject. In Programming Elixir you’ll have ten pages that describe the recursive function and quickly jump to lists navigation, high order functions, and tail call optimization. In Learn Functional Programming With Elixir, we have entire a chapter with more than 20 pages about recursive functions. You’ll see bounded and unbounded recursion, decrease and conquer, divide and conquer, tail call optimization, and anonymous recursive functions. Then, we have another chapter with more than 20 pages to explain high-order functions, giving you several examples from simples lists operations to lazy computation.

I’ll hope this explanation help you understand the difference between the two books.

11
Post #4
mstibbard

mstibbard

Just finished this book. It was a fantastic introduction to functional programming and the elixir syntax for an absolute beginner. If you have prior experience programming but not with functional programming then I’d still highly recommend this as a starting point.

Where Next?

Popular in Books Top

PragmaticBookshelf
Bruce A. Tate @redrapids and Sophie DeBenedetto @SophieDeBenedetto edited by Jacquelyn Carter @jkcarter The days of the traditional requ...
New
AstonJ
by Martin Logan, Eric Merritt, and Richard Carlsson Erlang and OTP in Action teaches you the concepts of concurrent programming and the ...
New
PragmaticBookshelf
Bruce Tate @redrapids edited by Jacquelyn Carter @jkcarter Elixir is a functional language that crosses many boundaries. With a syntax b...
New
wintermeyer
At https://elixir-phoenix-ash.com I publish training material for Elixir and Phoenix. Text base tutorials which start at zero. Recently I...
New
shankardevy
I am happy to announce that I am completing final rounds of my Phoenix book (which is now a series of books/booklets). ...
New
AstonJ
by Ben Marx, José Valim, Bruce Tate Bring Elixir into your company, with real-life strategies from the people who built Elixir and use i...
New
PragmaticBookshelf
Rebecca Le and Zach Daniel @zachdaniel _edited by Kelly Lee @k.lee _ Ash Framework is the game-changing toolkit for Elixir developers. W...
New
codestirring
Hey Elixir Forum, I’ve written a ebook called the Phoenix LiveView Cookbook which I’ve written in the hopes of distilling the knowledge ...
New
peerreynders
Don’t forget you can get 35% off the ebook using the code ‘devtalk.com’ :023: This title will be available on or about 2018-11-10
New
collegeimprovements
by @whatyouhide and @idlehands Elixir offers new paradigms, and challenges you to test in unconventional ways. Start with ExUnit: almost...
New

Other popular topics Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New

We're in Beta

About us Mission Statement