Ternary logic: Difference between revisions
→{{header|langur}}
(Add link to application) |
Langurmonkey (talk | contribs) |
||
Line 3,464:
=={{header|langur}}==
{{trans|Go}}
<syntaxhighlight lang="langur"># borrowing null for "maybe"
val .trSet = [false, null, true]
val .
val .and = f switch[and] .a, .b {
case true, null:
case null, true:
Line 3,476:
}
val .or = f
case false, null:
case null, false:
Line 3,484:
val .imply = f if(.a nor .b: not? .a; .b)
writeln "a not a"
for .a in .trSet {
writeln
}
Line 3,498 ⟶ 3,493:
for .a in .trSet {
for .b in .trSet {
writeln $"\.
}
}
Line 3,505 ⟶ 3,500:
for .a in .trSet {
for .b in .trSet {
writeln $"\.
}
}
Line 3,512 ⟶ 3,507:
for .a in .trSet {
for .b in .trSet {
writeln $"\.
}
}
Line 3,519 ⟶ 3,514:
for .a in .trSet {
for .b in .trSet {
writeln $"\.
}
}</syntaxhighlight>
|