Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Logical-operations/ReScript/logical-operations.re
Normal file
15
Task/Logical-operations/ReScript/logical-operations.re
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
let logic = (a, b) => {
|
||||
Js.log(string_of_bool(a) ++ " and " ++ string_of_bool(b) ++ " = " ++ string_of_bool(a && b))
|
||||
Js.log(string_of_bool(a) ++ " or " ++ string_of_bool(b) ++ " = " ++ string_of_bool(a || b))
|
||||
}
|
||||
|
||||
let logic2 = (a) =>
|
||||
Js.log("not(" ++ string_of_bool(a) ++ ") = " ++ string_of_bool(!a))
|
||||
|
||||
logic(true, true)
|
||||
logic(true, false)
|
||||
logic(false, true)
|
||||
logic(false, false)
|
||||
|
||||
logic2(true)
|
||||
logic2(false)
|
||||
Loading…
Add table
Add a link
Reference in a new issue