Conditional notation is a way to specify a specific condition for Lagmite. In this case, it is denoted with <<>> and is highlighted orange. The notation format uses simple unknowns (#) or using the variables that are stated. Usually, this notation is used for the gen function. As an example, to generate the first 10 even numbers and squared, you can use the syntax:

disp [list] (gen [expr] #^2 <<calc [expr] #%2 == [expr] 0>> {1,10})

//Expected output: [4,16,36,64,100]

Basics

The operators that are used are:

Most conditional notation formats follow the examples below:

Complex Logic

As an example, to show the word “math” when 1+6=7, we can use the syntax below:

disp [text] (calc [expr] 1+6)
disp [text] math <<[expr] ~== [expr] 7>>

//Expected output: math

Here, we utilized a simple known (~) to compare its value to 7, in which returns true, so it displays “math”.