\u003cp\u003e\u003cb\u003eLearn functional data structures and algorithms for your applications and bring their benefits to your work now\u003c/b\u003e\u003c/p\u003e\u003ch2\u003eAbout This Book\u003c/h2\u003e\u003cul\u003e\u003cli\u003eMoving from object-oriented programming to functional programming? This book will help you get started with functional programming.\u003c/li\u003e\u003cli\u003eEasy-to-understand explanations of practical topics will help you get started with functional data structures.\u003c/li\u003e\u003cli\u003eIllustrative diagrams to explain the algorithms in detail.\u003c/li\u003e\u003cli\u003eGet hands-on practice of Scala to get the most out of functional programming.\u003c/li\u003e\u003c/ul\u003e\u003ch2\u003eWho This Book Is For\u003c/h2\u003e\u003cp\u003eThis book is for those who have some experience in functional programming languages. The data structures in this book are primarily written in Scala, however implementing the algorithms in other functional languages should be straight forward.\u003c/p\u003e\u003ch2\u003eWhat You Will Learn\u003c/h2\u003e\u003cul\u003e\u003cli\u003eLearn to think in the functional paradigm\u003c/li\u003e\u003cli\u003eUnderstand common data structures and the associated algorithms, as well as the context in which they are commonly used\u003c/li\u003e\u003cli\u003eTake a look at the runtime and space complexities with the O notation\u003c/li\u003e\u003cli\u003eSee how ADTs are implemented in a functional setting\u003c/li\u003e\u003cli\u003eExplore the basic theme of immutability and persistent data structures\u003c/li\u003e\u003cli\u003eFind out how the internal algorithms are redesigned to exploit structural sharing, so that the persistent data structures perform well, avoiding needless copying.\u003c/li\u003e\u003cli\u003eGet to know functional features like lazy evaluation and recursion used to implement efficient algorithms\u003c/li\u003e\u003cli\u003eGain Scala best practices and idioms\u003c/li\u003e\u003c/ul\u003e\u003ch2\u003eIn Detail\u003c/h2\u003e\u003cp\u003eFunctional data structures have the power to improve the codebase 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.\u003c/p\u003e\u003cp\u003eHow do we express traditional algorithms in functional setting? Wonât we end up copying too much? Do we trade performance for versioned data structures?\u003c/p\u003e\u003cp\u003eThis book attempts to answer these questions by looking at functional implementations of traditional algorithms.\u003c/p\u003e\u003cp\u003eIt begins with a refresher and consolidation of 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.\u003c/p\u003e\u003cp\u003eScala is the primary implementation languages for most of the examples. At times, we also present Clojure snippets to illustrate the underlying fundamental theme. While writing code, we use ADTs (abstract data types). Stacks, Queues, Trees and Graphs are all familiar ADTs. You will see how these ADTs are implemented in a functional setting. We look at implementation techniques like amortization and lazy evaluation to ensure efficiency.\u003c/p\u003e\u003cp\u003eBy the end of the book, you will be able to write efficient functional data structures and algorithms for your applications.\u003c/p\u003e\u003ch2\u003eStyle and approach\u003c/h2\u003e\u003cp\u003eStep-by-step topics will help you get started with functional programming. Learn by doing with hands-on code snippets that give you practical experience of the subject.\u003c/p\u003e