Small ML Language
  • Small ML language
  • Installation
  • Hello World
  • Basics
    • Literals
    • Types
    • Type casting
    • Variables
    • Operators
    • Functions
    • Function chaining
    • Conditionals
    • Match
    • Arrays
    • Structs
    • Structure field Access
    • Enums
    • Enum Specialization
    • Object Destructuring
    • Modules
  • Compiler internals
    • SMLL to JAVA
Powered by GitBook
On this page
  1. Basics

Conditionals

Branching on that condition.

Conditionals are very useful because they allow use to execute different instructions based on a boolean condition. Conditionals can also be nested to create complex instructions and branches.

if 10 > 2 then true else false
if null? then println("Is null") else println("Not null :)")
PreviousFunction chainingNextMatch

Last updated 10 months ago