- Haskell Tutorial
- Haskell - Home
- Haskell - Overview
- Haskell - Environment Set Up
- Haskell - Basic Data Models
- Haskell - Basic Operators
- Haskell - Decision Making
- Haskell - Types and Type Class
- Haskell - Functions
- Haskell - More On Functions
- Haskell - Function Composition
- Haskell - Modules
- Haskell - Input & Output
- Haskell - Functor
- Haskell - Monads
- Haskell - Zippers
- Haskell Useful Resources
- Haskell - Quick Guide
- Haskell - Useful Resources
- Haskell - Discussion
Haskell - Decision Making
Decision Making is a feature that allows the programmers to apply a condition in the code flow. The programmer can execute a set of instructions depending on a predefined condition. The following flowchart shows the decision-making structure of Haskell −
Haskell provides the following types of decision-making statements −
Sr.No. | Statement & Description |
---|---|
1 | if–else statement
One if statement with an else statement. The instruction in the else block will execute only when the given Boolean condition fails to satisfy. |
2 | Nested if-else statement
Multiple if blocks followed by else blocks |
Advertisements