fork/numbat

git clone https://git.julia.blue/fork/numbat

David PeterChange bool => Bool, str => String3b90678

v1.8.0
403 B16 linesraw
1fn not(a: Bool) = if a then false else true
2fn and(a: Bool, b: Bool) = if a then b else false
3fn or(a: Bool, b: Bool) = if a then true else b
4
5assert(not(false))
6assert(not(not(true)))
7
8assert(and(true, true))
9assert(not(and(true, false)))
10assert(not(and(false, true)))
11assert(not(and(false, false)))
12
13assert(or(true, true))
14assert(or(true, false))
15assert(or(false, true))
16assert(not(or(false, false)))