
- Clojure - Home
- Clojure - Overview
- Clojure - Environment
- Clojure - Basic Syntax
- Clojure - REPL
- Clojure - Data Types
- Clojure - Variables
- Clojure - Operators
- Clojure - Loops
- Clojure - Decision Making
- Clojure - Functions
- Clojure - Numbers
- Clojure - Recursion
- Clojure - File I/O
- Clojure - Strings
- Clojure - Lists
- Clojure - Sets
- Clojure - Vectors
- Clojure - Maps
- Clojure - Namespaces
- Clojure - Exception Handling
- Clojure - Sequences
- Clojure - Regular Expressions
- Clojure - Predicates
- Clojure - Destructuring
- Clojure - Date & Time
- Clojure - Atoms
- Clojure - Metadata
- Clojure - StructMaps
- Clojure - Agents
- Clojure - Watchers
- Clojure - Macros
- Clojure - Reference Values
- Clojure - Databases
- Clojure - Java Interface
- Clojure - Concurrent Programming
- Clojure - Applications
- Clojure - Automated Testing
- Clojure - Libraries
Clojure - Decision Making
Decision-making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false.
Sr.No. | Methods & Description |
---|---|
1 |
If Statement
In Clojure, the condition is an expression which evaluates it to be either true or false. 'If' the condition is true, then statement#1 will be executed, else statement#2 will be executed. |
2 |
If/do Expression
The if-do expression in Clojure is used to allow multiple expressions to be executed for each branch of the if statement. |
3 |
Nested If Statement
Multiple 'if' statements embedded inside each other. |
4 |
Case Statement
Clojure offers the case statement which is similar to the switch statement available in the Java programming language. |
5 |
Cond Statement
Clojure offers another evaluation statement called the cond statement. This statement takes a set of test/expression pairs. |