Logical operations: Difference between revisions

Line 2,252:
<syntaxhighlight lang="langur">val .test = fn(.a, .b) {
join("\n", [
$"not \{{.a;}}: \{{not .a}}",
$"\{{.a;}} and \{{.b;}}: \{{.a and .b;}}",
$"\{{.a;}} nand \{{.b;}}: \{{.a nand .b;}}",
$"\{{.a;}} or \{{.b;}}: \{{.a or .b;}}",
$"\{{.a;}} nor \{{.b;}}: \{{.a nor .b;}}",
$"\{{.a;}} xor \{{.b;}}: \{{.a xor .b;}}",
$"\{{.a;}} nxor \{{.b;}}: \{{.a nxor .b;}}",
"",
$"not? \{{.a;}}: \{{not? .a}}",
$"\{{.a;}} and? \{{.b;}}: \{{.a and? .b;}}",
$"\{{.a;}} nand? \{{.b;}}: \{{.a nand? .b;}}",
$"\{{.a;}} or? \{{.b;}}: \{{.a or? .b;}}",
$"\{{.a;}} nor? \{{.b;}}: \{{.a nor? .b;}}",
$"\{{.a;}} xor? \{{.b;}}: \{{.a xor? .b;}}",
$"\{{.a;}} nxor? \{{.b;}}: \{{.a nxor? .b;}}",
"\n",
])
890

edits