[[modding:function:geq]]
=== geq ===
[[modding:function:geq]]
^ Syntax | (geq a [b ... bn]) -> True if a >= b >= bn |
^ Arguments | a: The first expression you want to compare. |
^ | [b ... bn]: The next expressions you want to compare. |
^ Returns | boolean: The expressions are compared left to right. If there is any case where the left value is "less" then the right value, `geq' will return Nil. Else it returns True. |
^ Category | [[logical operator]] |
^ Description | A comparison function that returns true if the left hand side is greated than or equal to the right hand side. The same as >= in math. Integers are compared by value, so (geq 1 1) -> True, but (geq 1 2) -> Nil Strings are compared by alphabetical position, so (geq "a" "A") -> True, but (geq "a" "B") -> Nil Lists are compared by length, so (geq '(1) '(2)) -> True, but (geq '(2) '(1 1)) -> Nil It is advised to play around with this a bit to get a feeling of how things compare |
=== Example ===
(geq 7 3)
Returns True.
(geq "Betel" "Betelgeuse")
Returns Nil.
(geq '(a a b) '(c d e))
Returns Nil.
(geq "B" "b")
Returns True.
Return to [[:Functions]] list