Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
9
Task/Logical-operations/ArkScript/logical-operations.ark
Normal file
9
Task/Logical-operations/ArkScript/logical-operations.ark
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
(let logic (fun (a b) {
|
||||
(print "a and b: " (and a b))
|
||||
(print "a or b:" (or a b))
|
||||
(print "not a: " (not a)) }))
|
||||
|
||||
(logic true true)
|
||||
(logic true false)
|
||||
(logic false true)
|
||||
(logic false false)
|
||||
22
Task/Logical-operations/DuckDB/logical-operations.duckdb
Normal file
22
Task/Logical-operations/DuckDB/logical-operations.duckdb
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
create or replace function demo(p, q) as table (
|
||||
select p as p,
|
||||
q as q,
|
||||
p and q as and,
|
||||
p or q as or,
|
||||
not p as "NOT p",
|
||||
(p is TRUE) as "p is TRUE",
|
||||
(p is NULL) as "p is NULL"
|
||||
);
|
||||
|
||||
# Some examples
|
||||
from demo(0, 0)
|
||||
union all
|
||||
from demo(0, 1)
|
||||
union all
|
||||
from demo(true, true)
|
||||
union all
|
||||
from demo(0, null)
|
||||
union all
|
||||
from demo(1, null)
|
||||
union all
|
||||
from demo(null, null);
|
||||
14
Task/Logical-operations/Red/logical-operations.red
Normal file
14
Task/Logical-operations/Red/logical-operations.red
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Red [ "Logical Operations - Hinjo, 23 July 2025" ]
|
||||
|
||||
test: func [a b] [
|
||||
foreach op [and or xor not] [
|
||||
either op = 'not
|
||||
[ print [op a "==>" do compose [(op) a]] ]
|
||||
[ print [a op b "==>" do compose [a (op) b]] ]
|
||||
] print ""
|
||||
]
|
||||
|
||||
test true true
|
||||
test true false
|
||||
test false true
|
||||
test false false
|
||||
Loading…
Add table
Add a link
Reference in a new issue