2022-09-25 10:40:36 +02:00
|
|
|
-- If executes then first block when condition is true
|
2022-10-31 00:39:56 +01:00
|
|
|
if true (say 1),
|
|
|
|
if true (say 2) (say 3),
|
2022-09-25 10:40:36 +02:00
|
|
|
|
|
|
|
-- If executes second block when condition is false
|
2022-10-31 00:39:56 +01:00
|
|
|
if false (say 4) (say 5),
|
2022-09-25 10:40:36 +02:00
|
|
|
|
|
|
|
-- If returns nil when without else block
|
2022-10-31 00:39:56 +01:00
|
|
|
say (if false (say 6)),
|
2022-09-25 10:40:36 +02:00
|
|
|
|
|
|
|
-- If returns block execution value
|
2022-10-31 00:39:56 +01:00
|
|
|
say (if true (7)),
|
|
|
|
say (if false (say 100, 8) (say 200, 9)),
|