modding:function:ls
ls
Syntax | (ls 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 “greater” than or equal to the right value, `ls' will return Nil. Else it returns True. |
Category | logical operator |
Description | kA comparison function that returns True if the left hand side is less than the right hand side. The same as < in math. Integers are compared by value, so (ls 1 2) → True, but (ls 1 1) → Nil Strings are compared by alphabetical position, so (ls “a” “b”) → True, but (ls “a” “A”) → Nil Lists are compared by length, so (ls '(2) '(1 1)) → True, but (ls '(1) '(2)) → Nil |
NOTE: The function < has not been documented, but is believed to act exactly as ls does.
Example
(ls 7 3)
Returns Nil.
(< 7 3)
Also returns Nil.
(ls "Betel" "Betelgeuse")
Returns True.
(ls '(a a b) '(c d e))
Returns True.
(ls "B" "b")
Returns Nil.
Return to Functions list
modding/function/ls.txt · Last modified: 2014/12/27 04:40 by 127.0.0.1