Haskell Programming: A Step-by-Step Guide to Learn, in an Easy Way the Fundamentals of Haskell Programming Language
- Length: 255 pages
- Edition: 1
- Language: English
- Publication Date: 2021-07-21
- ISBN-10: B09B2NBJ3B
- Sales Rank: #0 (See Top 100 Books)
A balance of flexible and inflexible qualities make Haskell a fascinating programming language to learn and use.
First, the Haskell programming language is not named after Eddie Haskell, the sneaky double-dealing neighbor kid in the ancient TV sitcom, Leave It To Beaver.
Haskell is named after Haskell Brooks Curry, an American mathematician and logician. If you don’t know, logicians create models to describe and define human reasoning, for example, problems in mathematics, computer science, and philosophy. Haskell’s main work was in combinatory logic, a notation designed to eliminate the need for variables in mathematical logic. Combinatory logic captures many key features of computation and, as a result, is useful in computer science. Haskell has three programming languages named after him: Haskell, Brooks, and Curry.
Haskell the language is built around functions, useful blocks of code that do specific tasks. They are called and used only when needed.
Another interesting feature of functional languages like Haskell: functions are treated as values like integers (numbers) and strings. You can add a function to another function the way you can add an integer to an integer, 1 + 1 or 35 + 53. Perhaps the best way to describe this quality is a spreadsheet: in a cell in the spreadsheet, you can add numbers as well as a combination of functions to work on numbers. For example, you might specify each number in cells 1-10 be added up as a sum. In Excel, at least, you also can use SUMIF to look for a pattern in cells 1-10 and, if the pattern is found, perform an action on any cells with the pattern.
What Makes Haskell Special?
Technically, Haskell is a general-purpose functional programming language with non-strict semantics and strong static typing. The primary control construct is the function. (Say that fast ten times!) Here’s what it means:
– Every language has a strategy to evaluate when to process the input arguments used in a call to a function. The simplest strategy is to evaluate the input arguments passed then run the function with the arguments. Non-strict semantics means the input arguments are not evaluated unless the arguments passed into the function are used to evaluate what is in the body of the function.
– Programming languages have rules to assign properties — called a type — to the components of the language: variables, functions, expressions, and modules. A type is a general description of possible values the variable, function, expression, or module can store. Typing helps minimize bugs, for example, when a calculation uses a string (“house” or “cat”) instead of a number (2 or 3). Strong static typing evaluates the code before runtime, when the code is static and possibly as code is written.
– The order in which statements, instructions and functions are evaluated and executed determines the results of any piece of code. Control constructs define the order of evaluation. Constructs use an initial keyword to flag the type of control structure used. Initial keywords might be “if” or “do” or “loop” while final keywords might be “end if” or “enddo” or “end loop”. Instead of a final keyword, Haskell uses indentation level (tabs) or curly brackets, or a mix, to indicate the end of a control structure.
Perhaps what makes Haskell special is how coders have to think when they use the language. Functional programming languages work in very different ways than imperative languages where the coder manages many low-level details of what happens in their code and when. While it is true all languages have things in common, it’s also true languages are mostly functional or mostly imperative, the way people are mostly right handed or left handed. Except functional programming languages require a different way of thinking about software as you code
INTRODUCTION WHAT MAKES HASKELL SPECIAL? HOW IS HASKELL USED? WHAT DO YOU NEED TO START STARTING READY, SET, GO! THE FIRST SMALL FUNCTIONS AN INTRODUCTION TO THE LISTS TEXAS RANGES I'M AN INTENSIONAL LIST TUPLES CHAPTER I TYPES AND TYPE CLASSES BELIEVE IN THE TYPE TYPE VARIABLES TYPE CLASSES STEP BY STEP (1ST PART) CHAPTER II THE SYNTAX OF FUNCTIONS PATTERN ADJUSTMENT GUARDIANS, GUARDIANS! WHERE? LET IT BE CASE EXPRESSIONS CHAPTER III RECURSION HELLO RECURSION! THE IMPRESSIVE MAXIMUM A FEW MORE RECURSIVE FUNCTIONS QUICKSORT! THINKING RECURSIVELY CHAPTER IV HIGHER ORDER FUNCTIONS CURRIFIED FUNCTIONS HIGHER ORDER IN YOUR ORDER ASSOCIATIONS AND FILTERS LAMBDAS FOLDS AND ORIGAMI APPLICATION OF FUNCTIONS WITH $ COMPOSITION OF FUNCTIONS CHAPTER V MODULES LOADING MODULES DATA LIST DATA CHAR DATA MAP DATA SET CREATING OUR OWN MODULES CHAPTER VI CREATING OUR OWN TYPES AND TYPE CLASSES INTRODUCTION TO ALGEBRAIC DATA TYPES REGISTRATION SYNTAX TYPE PARAMETERS DERIVED INSTANCES TYPE SYNONYMS RECURSIVE DATA STRUCTURES TYPE CLASSES STEP BY STEP (2ND PART) THE YES-NO TYPE CLASS THE FUNCTOR TYPE CLASS FAMILIES AND MARTIAL ARTS CHAPTER VII INPUT AND OUTPUT HELLO WORLD! FILES AND DATA STREAMS COMMAND LINE PARAMETERS RANDOMNESS BYTE STRINGS EXCEPTIONS
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.