December 2021
Beginner
840 pages
47h 29m
English
A key language concept in Haskell is that all functions have types. Function, parameter, and value names must begin with a lowercase letter.
The following are some simple user-defined functions:
Here, when :type square is entered (line 3), the response of the interpreter is square :: Num a => a -> a (line 4), which is a qualified type. Recall that the a means “any type” and is called a type variable. To promote flexibility, especially in function definitions, ...
Read now
Unlock full access