Book Image

Learning F# Functional Data Structures and Algorithms

By : Adnan Masood
Book Image

Learning F# Functional Data Structures and Algorithms

By: Adnan Masood

Overview of this book

Table of Contents (21 chapters)
Learning F# Functional Data Structures and Algorithms
Credits
Foreword
Foreword
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we covered a lot of ground. We started with building a basic ADT of stack using F# and after implementing the fundamental operations, proceeded to make a concurrent version of stack. Then, step by step, we learned how to do unit testing in C# for an F# program, and how to implement the same test method in F#. Later we used our knowledge of stack operations to implement the parenthesis balancing algorithm.

Continuing with the theme of implementing ADTs, in the next chapter, we will learn about graph related algorithms, and implementation of our own trees. Starting from a simple binary tree, we will discuss how implementation differs for an imperative (mutable) versus persistent structure. Then we will cover balancing and the assessment of amortization cost whilst analyzing an AVL tree implementation and the operations on it. From there we will tackle tree searching and various traversal techniques. This will provide us with an insight into n-trees, balanced trees,...