# SLet

This esolang has 5 data types:

```1.Set: e.g. {1,2,3}
2.Instruction: e.g. Print "Hello, world!"
3.List: e.g. [{1},{2},{3}]
4.Boolean: True or False
5.Nil: just like lua's
```

A program is written in 1 line. Comments are written between parentheses.

Symbols besides ( ) " and space are the same as space.

Commands are only

```let [variable name] [value]
print [text/number] [value]
if [condition1] then [instructions1] {elif [condition2] then [instruction2]} {elif [condition3] then [instruction3]} {...} {default [instruction]} end
loop [variable1] [value1] {and [variable2] [value2]} {...} while [condition] do [instructions] end
return [value]
```

A single number is a set e.g.

```29 (this is a set {29})
```

To create a set or combine sets, use this:

```combine 29 30 31 all (a set {29,30,31})
```

To create a list, use this:

```list 29 30 31 all (a list [29,30,31])
"Hello, world!" (a list of this string's ASCII)
```

Calculations:

```lv 0 a b (addition a+b)
lv 1 a b (multiplication a*b)
lv 2 a b (a to the b'th power)
solve x left lv 0 a x right b end (subtract b-a, actually means the solution of equation a+x=b)
equal a b all (returns boolean type)
is a [greater/less] than {or equal} b (returns boolean)
```
```intersect a b all (intersection of two sets)

replace [a list] from [index] to [index]
size [a list or set]

nor [boolean1] {boolean2} {...} all

```

calculation is did between every 2 numbers in the set e.g.{1,4}+{5,6}={6,7,9,10}

use

```input [set/list/text]
```

to get input

# Examples

Hello World

```list print text "Hello, world!" all
```

A+B

```list let a input set let b input set let c lv 0 a b print number c all
```

Truth machine( This rogram is written like Lisp for better understanding

```{list
{let in input set}
{if {equal in 0 all} then {list
{print number 0}
all}
default {list
{loop i 1 while true do {list
{print number 1}
all}
end} all} end}
all}
```