Learning F# Functional Data Structures and Algorithms

Get started with F# and explore functional programming paradigm with data structures and algorithms
Preview in Mapt

Learning F# Functional Data Structures and Algorithms

Adnan Masood

1 customer reviews
Get started with F# and explore functional programming paradigm with data structures and algorithms
Mapt Subscription
FREE
$29.99/m after trial
eBook
$22.40
RRP $31.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packtโ€™s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$22.40
$39.99
$29.99p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning F# Functional Data Structures and Algorithms Book Cover
Learning F# Functional Data Structures and Algorithms
$ 31.99
$ 22.40
Learning Functional Data Structures and Algorithms Book Cover
Learning Functional Data Structures and Algorithms
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $32.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781783558476
Paperback206 pages

Book Description

F# is a multi-paradigm programming language that encompasses object-oriented, imperative, and functional programming language properties. The F# functional programming language enables developers to write simple code to solve complex problems.

Starting with the fundamental concepts of F# and functional programming, this book will walk you through basic problems, helping you to write functional and maintainable code. Using easy-to-understand examples, you will learn how to design data structures and algorithms in F# and apply these concepts in real-life projects. The book will cover built-in data structures and take you through enumerations and sequences. You will gain knowledge about stacks, graph-related algorithms, and implementations of binary trees. Next, you will understand the custom functional implementation of a queue, review sets and maps, and explore the implementation of a vector. Finally, you will find resources and references that will give you a comprehensive overview of F# ecosystem, helping you to go beyond the fundamentals.

Table of Contents

Chapter 1: Embrace the Truth
Exploring the functional programming paradigm
Thinking functional โ€“ why functional programming matters
A historical primer of F#
The Hello World example
A brief F# language primer
Syntactical similarities and differences
Benefits of using F# over C#
Summary
Chapter 2: Now Lazily Get Over It, Again
Setting up the IDE
Your first F# project
Talk is cheap, show me some code
To understand recursion, you must understand recursion
Memoization with Fibonacci
Towers of Hanoi
Sorting lazily
F# 4.0 โ€“ new features
Summary
Chapter 3: What's in the Bag Anyway?
Exploring data structures in F#
F# implementation of sorting algorithms
Algorithmic complexity and the Big-O notation
Summary
Chapter 4: Are We There Yet?
Diving deep into enumerations and sequences
Enumerating a CSV file
Query expressions
Creating sequences from collections
Usage considerations for sequences
Summary
Chapter 5: Let's Stack Up
Let's build a stack
Stack with concurrency support
Testing the stack
Algorithm โ€“ parenthesis matching using stacks
Summary
Chapter 6: See the Forest for the Trees
Tree as a data structure
The binary search tree
Navigating the tree
Abstract syntax trees
Summary
Chapter 7: Jumping the Queue
Let's make a functional queue
The FSharpx.Collections library
Summary
Chapter 8: Quick Boost with Graph
Graphs
Modeling graphs using F#
The shortest path algorithm
Finding the minimal path sum
Summary
Chapter 9: Sets, Maps, and Vectors of Indirections
Sets and maps
Vectors
F# and the Intermediate Language
Summary
Chapter 10: Where to Go Next?
References and further readings
F# language resources
Component design guidelines
Functional programming guides
Books and interactive tutorials
Video tutorials
Community projects โ€“ development tools
Community projects โ€“ functional programming
Community projects โ€“ data science programming
Community projects โ€“ the GPU execution
General functional programming
Academic resources
Summary

What You Will Learn

  • Familiarize yourself with the functional programming nature of F# and explore its fundamentals
  • Utilize data structures available in F# and apply recursion and lazy evaluation
  • Gain insights into functional programming paradigms; dissect F# code and analyze code available in community projects
  • Build abstract data structures and utilize powerful optimization techniques such as memoization
  • Explore and test built-in F# bespoke data structures and algorithms
  • Become resourceful and learn how to easily reuse libraries contributed by the C# and F# community
  • Understand the trade-offs in selecting purely functional (persistent) over mutable data structures
  • Implement custom ADT (Abstract Data Type), and discover parallel programming and asynchrony within F#

Authors

Table of Contents

Chapter 1: Embrace the Truth
Exploring the functional programming paradigm
Thinking functional โ€“ why functional programming matters
A historical primer of F#
The Hello World example
A brief F# language primer
Syntactical similarities and differences
Benefits of using F# over C#
Summary
Chapter 2: Now Lazily Get Over It, Again
Setting up the IDE
Your first F# project
Talk is cheap, show me some code
To understand recursion, you must understand recursion
Memoization with Fibonacci
Towers of Hanoi
Sorting lazily
F# 4.0 โ€“ new features
Summary
Chapter 3: What's in the Bag Anyway?
Exploring data structures in F#
F# implementation of sorting algorithms
Algorithmic complexity and the Big-O notation
Summary
Chapter 4: Are We There Yet?
Diving deep into enumerations and sequences
Enumerating a CSV file
Query expressions
Creating sequences from collections
Usage considerations for sequences
Summary
Chapter 5: Let's Stack Up
Let's build a stack
Stack with concurrency support
Testing the stack
Algorithm โ€“ parenthesis matching using stacks
Summary
Chapter 6: See the Forest for the Trees
Tree as a data structure
The binary search tree
Navigating the tree
Abstract syntax trees
Summary
Chapter 7: Jumping the Queue
Let's make a functional queue
The FSharpx.Collections library
Summary
Chapter 8: Quick Boost with Graph
Graphs
Modeling graphs using F#
The shortest path algorithm
Finding the minimal path sum
Summary
Chapter 9: Sets, Maps, and Vectors of Indirections
Sets and maps
Vectors
F# and the Intermediate Language
Summary
Chapter 10: Where to Go Next?
References and further readings
F# language resources
Component design guidelines
Functional programming guides
Books and interactive tutorials
Video tutorials
Community projects โ€“ development tools
Community projects โ€“ functional programming
Community projects โ€“ data science programming
Community projects โ€“ the GPU execution
General functional programming
Academic resources
Summary

Book Details

ISBN 139781783558476
Paperback206 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

F# 4.0 Design Patterns Book Cover
F# 4.0 Design Patterns
$ 35.99
$ 25.20
C# 6 and .NET Core 1.0: Modern Cross-Platform Development Book Cover
C# 6 and .NET Core 1.0: Modern Cross-Platform Development
$ 39.99
$ 28.00
F# for Quantitative Finance Book Cover
F# for Quantitative Finance
$ 26.99
$ 18.90
F# High Performance Book Cover
F# High Performance
$ 35.99
$ 25.20
Mastering F# Book Cover
Mastering F#
$ 35.99
$ 25.20
Testing with F# Book Cover
Testing with F#
$ 26.99
$ 18.90