23 lines
536 B
Text
23 lines
536 B
Text
import system'routines;
|
|
import extensions;
|
|
|
|
Func<bool, bool> a = (bool x){ console.writeLine:"a"; ^ x };
|
|
|
|
Func<bool, bool> b = (bool x){ console.writeLine:"b"; ^ x };
|
|
|
|
const bool[] boolValues = new bool[]::( false, true );
|
|
|
|
public program()
|
|
{
|
|
boolValues.forEach:(bool i)
|
|
{
|
|
boolValues.forEach:(bool j)
|
|
{
|
|
console.printLine(i," and ",j," = ",a(i) && b(j));
|
|
|
|
console.writeLine();
|
|
console.printLine(i," or ",j," = ",a(i) || b(j));
|
|
console.writeLine()
|
|
}
|
|
}
|
|
}
|