- 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
- jQuery EasyUI網站開發實戰
- Network Automation Cookbook
- 人臉識別原理及算法:動態人臉識別系統研究
- Internet of Things with Intel Galileo
- Hands-On Reinforcement Learning with Python
- JavaCAPS基礎、應用與案例
- C++寶典
- Building Wireless Sensor Networks Using Arduino
- Building Dynamics CRM 2015 Dashboards with Power BI
- Android應用開發實戰
- scikit-learn Cookbook(Second Edition)
- Tableau Dashboard Cookbook
- Test-Driven iOS Development with Swift
- Mastering Machine Learning with R
- 算法超簡單:趣味游戲帶你輕松入門與實踐