Learn Functional Programming with Elixir: New Foundations for a New World (The Pragmatic Programmers) by Ulisses Almeida

Learn Functional Programming with Elixir: New Foundations for a New World (The Pragmatic Programmers) by Ulisses Almeida

Author:Ulisses Almeida [Almeida, Ulisses]
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
Publisher: Pragmatic Bookshelf
Published: 2018-02-22T23:00:00+00:00


Creating Higher-Order Functions for Lists

Using functions in variables, like with any other value, can be hard to remember for newcomers. To practice, we’ll work with a subject familiar to us: lists. They’re a useful data type and are present in almost any program we need to build. We’ve seen how to work with them using recursive functions, but if we stop and look again at all that code we’ve written, we’ll see that they are a little bit repetitive and boring. We always have code that navigates through each item, and a stop condition when the list is empty. It’s time to change it! We’ll look at how to build higher-order functions that hide the tedious tasks and provide an interface for what matters. Let’s start with the navigation routine.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.