Skip to content

phasetr/AlgorithmsAndDataStructureByFSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms and Data Structures by (mainly) the F# language

Motivation

I'd like to write codes for algorithms and data structures by F#.

We have many many books for them in imperative or objective-oriented languages, but we have few books in functional languages. We have some famous books in functional languages, but they are difficult to me. And, for some reasons, I'd like to study the themes by F#. Some comments are here.

  • Richard Bird, Pearls of Functional Algorithm Design, written by Haskell: This is very difficult and we meet many unusual themes in it. I'd like to study usual themes. Furthermore it treats only algorithms.
  • Chris Okasaki, Purely Functional Data Structures, written by SML and Haskell: We have only data structure themes in this book, and small amount of them.
  • Masood, Learning F# Functional Data Structures and Algorithms written by F#: The codes in this book is written by imperative style, I think. I'd like to study functional style algorithms.
  • vkostrykov, scalacaster written by Scala: Data structure objects seem to be mutable objects. I'd like to study immutable style.
  • Rabhi and Lapalme, Algorithms A Functional Programming Approach written by Haskell: This looks more algorithms than others.
  • (NEW! 2020) Bird, Gibbons, Algorithm Design with Haskell. Now I reading this book (at 2022/1), and I am rewriting to F#! This book includes data structures, and is relatively easy to read.

Hence I decide to write codes by myself.

For my study and seminars I also contains programs by several languages other than F#, e.g., C++, Python.

Directory Structure

  • AOJ: Codes for the contests in AOJ. This site also contains some fundamental algorithms and data structure codes in the form of problems, and is very good introductory one.
  • AtCoder: Codes for the contests in AtCoder.
  • DataStructures: Codes for data structures. I added comments for referenced sites, pages, book pages.
  • Book-AlgorithmsAndDataStructuresForProgrammingContests: Codes for this book.
  • Library: Codes for important processes.

References

I know their names, but I do not read them thoroughly.

F# references

Algorithms and data structures

F# official

memo

Sample codes

Useful pages in fsharpforfunandprofit.com

Jargon Alert

From the book Domain Modeling Made Functional by Wlaschin.

  • In the error-handling context, the bind function converts a Result-generating function into a two-track function. It’s used to chain Result-generating functions "in series." More generally, the bind function is a key component of a monad.
  • In the error-handling context, the map function converts a one-track function into a two-track function.
  • The monadic approach to composition refers to combining functions in series using bind.
  • The applicative approach to composition refers to combining results in parallel.

About

algorithms and data structures by F#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published