January 2023
Intermediate to advanced
648 pages
17h 32m
English

In this chapter, we’ll see how Haskell can be used as a scientific calculator. Multiple scientific functions are available by default in this calculator. In Chapter 2, we’ll write functions of our own that we can load and use. This chapter introduces some features and details of the language that will be useful later. Let’s start with a kinematics problem.
Suppose we have a car on an air track. The car accelerates at a rate of 0.4 m/s2. At time t = 0, the car is stationary. How much time will it take for this car to travel 2 meters?
The acceleration is constant, so we can use the position-time equation. ...
Read now
Unlock full access