Skip to content

Commit c5ceb8d

Browse files
committed
update
1 parent 319b717 commit c5ceb8d

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,59 @@ false
244244

245245
### ||(...)
246246

247-
The *||()* function is the logical OR function. It takes an arbitrary number of expressions that evaluate to booleans
247+
The *||()* function is the logical OR function. It takes an arbitrary number of expressions that evaluate to booleans or boolean values themselves. If any of the arguments evaluates to true, the function will evaluate to true.
248+
249+
```
250+
>> ||(==(4, 3), 5)
251+
5
252+
>> ||(==(4, 3), true)
253+
true
254+
>> ||(==(4, 3), false)
255+
false
256+
```
257+
258+
### &&(...)
259+
260+
The *&&()* function is the logical AND function. It takes an arbitrary number of expressions that evaluate to booleans or boolean values themselves. If all of the arguments evaluates to true, the function will evaluate to true. If one is false, it evaluates to false.
261+
262+
```
263+
>> &&(true, false, true)
264+
false
265+
>> &&(==(9, 9), true, true)
266+
true
267+
>> &&(
268+
.. ||(==(3, 4), <=(1, 5)), true
269+
.. )
270+
true
271+
```
272+
273+
###not(arg1)
274+
275+
The *not()* function is the logical NOT function. It takes in an expression that evaluates to a boolean or a boolean itself and returns the opposite boolean to that argument
276+
277+
```
278+
>> not(8)
279+
false
280+
>> not(false)
281+
true
282+
>> not(&&(true, false))
283+
true
284+
```
285+
286+
###same(arg1, arg2)
287+
288+
The *same()* function compares two arguments and checks if their string representation is equal to each other. This is similar to the *==()* function but this also works on lists and structs, for which the *==()* does not.
289+
290+
291+
```
292+
>> same(1, 2)
293+
false
294+
>> same(1, 1)
295+
true
296+
>> same(1, `1`)
297+
false
298+
>> same(list(1, 2), list(1, 2))
299+
true
300+
>> ==(list(1, 2), list(1, 2))
301+
false
302+
```

0 commit comments

Comments
 (0)