Add support for not equals (!=) infix operation.

This commit is contained in:
2023-08-21 02:34:33 -07:00
parent 0b3700667d
commit 95fe6e9abb
5 changed files with 26 additions and 4 deletions

View File

@ -2,12 +2,15 @@
main = { in
three = 3
two = 2
calculateSimple = { in
(50 + three) * two
}
calculateComplex = { in
three + two + 50
}
multiply = { a, b in
a * b
}
@ -25,6 +28,14 @@ main = { in
!value
}
notEqual = { a, b in
a != b
}
equal = { a, b in
a == b
}
[
calculateSimpleResult,
calculateComplexResult,
@ -33,6 +44,10 @@ main = { in
trueValue,
falseValue,
invert(true),
invert(false)
invert(false),
equal(5, 5),
equal(5, 6),
notEqual(5, 5),
notEqual(5, 6)
]
}