RosettaCodeData/Task/Logical-operations/Nu/logical-operations.nu
2023-12-16 21:33:55 -08:00

3 lines
185 B
Text

def ops [a b] {{A: $a, B: $b, "Not A": (not $a), OR: ($a or $b), AND: ($a and $b), XOR: ($a xor $b)}}
[true false] | each {[[true $in] [false $in]]} | flatten | each {ops $in.0 $in.1}