Functional data structures have the power to improve the code base of an application and improve efficiency. With the advent of functional programming, and with powerful functional languages such as Scala, Clojure and Elixir becoming part of important enterprise applications, functional data structures have gained an important place in the developer toolkit. Immutability is a cornerstone of functional programming. Immutable and persistent data structures are thread-safe by definition and hence very appealing for writing robust concurrent programs. How do we express traditional algorithms in a functional setting? Won’t we end up copying too much? Do we trade performance for versioned data structures? This course attempts to answer these questions by looking at functional implementations of traditional algorithms.
It begins with a refresher and consolidates what functional programming is all about. Next, you’ll get to know about Lists, the work horse data type for most functional languages. We show what structural sharing means and how it helps to make immutable data structures efficient and practical. Moving on, you will learn about binary trees, where we will be building complete trees, greedy algorithms, and back tracking.
About the Author
Atul S. Khot grew up in Marathwada, a region of the state of Maharashtra, India. A self-taught programmer, he started writing software in C and C++. A Linux aficionado and a command-line guy at heart, Atul has always been a polyglot programmer. Having extensively programmed in Java and dabbled in multiple languages, these days he is getting increasingly hooked on Scala, Clojure, and Erlang. Atul is a frequent speaker at software conferences, and a past Dr. Dobb's product award judge. In his spare time, he loves to read classic British detective fiction. He is a foodie at heart and a pretty good cook. Atul someday dreams of working as a master chef, serving people with lip-smacking dishes.
He was the author of Scala Functional Programming Patterns published by Packt Publishing in December 2015. The book looks at traditional object-oriented design patterns and shows how we can use Scala's functional features instead.
Raju Kumar Mishra is a consultant and corporate trainer for big data and programming. After completing his B.Tech from Indian Institute of Technology (ISM) Dhanbad, he worked for Tata Steel. His deep passion for mathematics, data science, and programming took him to Indian Institute of Science (IISc). After graduating from IISc in computational science, he worked for Oracle as a performance engineer and software developer. He is an Oraclecertified associate for Java 7. He is a Hortonworks-certified Apache Hadoop Java developer, and holds a Developer Certification for Apache Spark (O'Reilly School of Technology and Databriks), and Revolution R Enterprise-certified Specialist Certifications. Apart from this, he has also cleared Financial Risk Manager (FRM I) exam. His interest in mathematics helped him in clearing the CT3 (Actuarial Science) exam.
In this video, we will print all the elements of an array and then apply higher level programming abstractions. Finally, you will learn about ABT.
In this video, we will first count even elements from the input list to show that functional programming is declarative and then show that there is no boiler plate in functional programming.
Higher order functions help us succinctly express logic. In this video, you will learn about higher order functions.
Instead of writing a loop using a mutable loop variable, functional languages advocate recursion as an alternative. In this video, we will see how recursion aids immutability.
In this video, you will first learn about copy-on-write, then to deal with excessive copying, we can resort to a feature called deferred processing.
In this video, you will learn to compose functions.
The big O notation is used to describe how fast an algorithm will run. In this video, we will describe the growth of the algorithm's running time versus the size of input data in Scala.
In this video, we will see how trading off some space by caching known results saves time and avoids needless computations.
In this video, we will show you that mathematical functions are not referentially transparent.
In this video, you will learn about the advantage of vectors over list. Also, you will learn to update elements in an array of elements.
In this video, we will look at collections and see how complexity helps us to see how they will perform in different situations. Also, we will look at commonly used collections and idioms with examples.
In this video, you will learn about the head and tail method.
This video shows us how to drop elements from the list.
This video deals with joining of two lists into a single list.
The main objective of this video is to teach you about persistent data structures and tail call optimization.
This video deals with appending and prepending of lists.
We cannot do random indexing on a linked list. So here in this video, we will get the value at index.
In this video, we will take a look at how to modify a list value.
This video shows us how to build a binary tree.
This video deals with comparing trees. Here we will also flip trees.
This video deals with implementation of dictionaries using binary search trees.
This video deals with various operations which can be performed using binary numbers.
This video teaches us about the algorithm that matches the longest possible part and also teaches us to find alternate possibilities in case of failure.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.