ENGLISH

Learning C++ Functional Programming (2017) [Anggoro] [9781787281974]

Book information

ISBN
9781787281974, 1787281973
Language
english
Format
PDF
Filesize
2 MB (1792461 bytes)
Pages
\298
Time added
2022-02-08 23:22:07

Description

Cover Copyright Credits About the Author About the Reviewer www.PacktPub.com Customer Feedback Table of Contents Preface Chapter 1: Diving into Modern C++ Getting closer with several new features in modern C++ Defining the data type automatically using the auto keyword Querying the type of an expression using the decltype keyword Pointing to a null pointer Returning an iterator using non-member begin() and end() function Iterating over collections using range-based for loops Leveraging the use of C++ language with the C++ Standard Libraries Placing any objects in the container Using algorithms Simplifying the function notation using a Lambda expression Using the Lambda expression for a tiny function Using the Lambda expression for multiline functions Returning a value from the Lambda expression Capturing a value to the Lambda expression Preparing the value using initialization captures Writing a generic Lambda expression to be used many times with many different data types Avoiding manual memory management with smart pointers Replacing a raw pointer using unique_ptr Sharing objects using shared_ptr Tracking the objects using a weak_ptr pointer Storing many different data types using tuples Unpacking tuples values Returning a tuple value type Summary Chapter 2: Manipulating Functions in Functional Programming Applying the first-class function in all functions Passing a function as another function's parameter Assigning a function to a variable Storing a function in the container Creating a new function from the existing functions at runtime Getting acquainted with three functional techniques in the higher-order function Executing each element list using map Extracting data using filter Combining all elements of a list using fold Avoiding the side effect with pure function Reducing a multiple arguments function with currying Summary Chapter 3: Applying Immutable State to the Function Understanding the essential part from immutable object Modifying a local variable Modifying a variable passed into a function Preventing the modification of a value Applying the first-class function and the pure function to the immutable object Developing the immutable object Starting with a mutable object Refactoring a mutable object into an immutable one Enumerating the benefits of being immutable Summary Chapter 4: Repeating Method Invocation Using Recursive Algorithm Repeating the function invocation recursively Performing the iteration procedure to repeat the process Performing the recursion procedure to repeat the process Recurring the immutable function Getting closer to tail recursion Getting acquainted with functional, procedural, and backtracking recursion Expecting results from functional recursion Running a task recursively in procedural recursion Backtracking recursion Summary Chapter 5: Procrastinating the Execution Process Using Lazy Evaluation Evaluating the expression Running the expression immediately with strict evaluation Delaying the expression with non-strict evaluation The basic concept of lazy evaluation Delaying the process Caching the value using the memoization technique Optimizing the code using the memoization technique Lazy evaluation in action Designing Chunk and Row classes Concatenating several rows Iterating each Row class' element Generating the infinite integer row Generating an infinite prime numbers row Refactoring eager evaluation to lazy evaluation Summary Chapter 6: Optimizing Code with Metaprogramming Introduction to metaprogramming Preprocessing the code using a macro Dissecting template metaprogramming in the Standard Library Building the template metaprogramming Adding a value to the variable in the template Mapping a function to the input parameters Choosing the correct process based on the condition Repeating the process recursively Selecting a type in compile-time Flow control with template metaprogramming Deciding the next process by the current condition Selecting the correct statement Looping the process Executing the code in compile-time Getting a compile-time constant Generating the class using a compile-time class generation Benefits and drawbacks of metaprogramming Summary Chapter 7: Running Parallel Execution Using Concurrency Concurrency in C++ Processing a single threading code Processing a multithreading code Synchronizing the threads using mutex Avoiding synchronization issues Unlocking the variable automatically Avoiding deadlock using recursive mutex Understanding the thread processing in a Windows operating system Working with handle Refactoring to a unique handle Triggering an event Calling an event from a thread Summary Chapter 8: Creating and Debugging Application in Functional Approach Preparing an imperative class Refactoring the imperative class to become a functional class Passing a function as a parameter Adding a base class Transforming the class to become pure Filtering the condition and implementing a Lambda expression Implementing recursion and memoization techniques to the Customer class Debugging the code Starting the debugging tool Continuing and stepping the debugging process Setting and deleting the breakpoint Printing the object value Summary Index

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

2008 · PDF