English 中文(简体)
Haskell - Decision Making
  • 时间:2024-12-22

Haskell - Decision Making


Previous Page Next Page  

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 −

Condition Loop

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