- Learning F# Functional Data Structures and Algorithms
- Adnan Masood Ph.D.
- 255字
- 2021-07-16 14:10:47
Chapter 2. Now Lazily Get Over It, Again

The perceived adversity of functional programming is overly exaggerated; the essence of this paradigm is to explicitly recognize and enforce the referential transparency. The previous chapter was an attempt to convince you about how amazing functional programming is; you saw some examples and read about some promised features but understandably, you are still little bit skeptical. This chapter will prepare you to delve into the F# fundamentals that we are going to utilize later.
Note
We will see how to set up the tooling for Visual Studio 2013 and for F# 3.1, the currently available version of F# at the time of writing. We will review the F# 4.0 preview features by the end of this project.
After we get the tooling sorted out, we will review some simple algorithms; starting with recursion with typical a Fibonacci sequence and Tower of Hanoi, we will perform lazy evaluation on a quick sort example. By the end of this chapter, you will be able to set up a development environment utilizing recursion as a major technique of functional algorithm designs, learn using memoization to cache intermediate results, and apply lazy evaluation in order to skip the unnecessary overhead of full execution.
In this chapter, we will cover the following topics:
- Setting up Visual Studio and F# compiler to work together
- Setting up the environment and running your F# programs
- Implementing a Fibonacci sequence using recursion
- Implementing Tower of Hanoi using recursion
- Applying lazy evaluation for quick sort
- 玩轉(zhuǎn)Scratch少兒趣味編程
- LabVIEW Graphical Programming Cookbook
- GeoServer Cookbook
- Visual Basic程序設(shè)計(jì)教程
- 基于Java技術(shù)的Web應(yīng)用開發(fā)
- 人臉識(shí)別原理及算法:動(dòng)態(tài)人臉識(shí)別系統(tǒng)研究
- Python高效開發(fā)實(shí)戰(zhàn):Django、Tornado、Flask、Twisted(第2版)
- 名師講壇:Spring實(shí)戰(zhàn)開發(fā)(Redis+SpringDataJPA+SpringMVC+SpringSecurity)
- Unity Game Development Scripting
- Mastering Apache Maven 3
- PLC應(yīng)用技術(shù)(三菱FX2N系列)
- SQL Server實(shí)用教程(SQL Server 2008版)
- R Data Science Essentials
- 監(jiān)控的藝術(shù):云原生時(shí)代的監(jiān)控框架
- The Statistics and Calculus with Python Workshop