A solution in Dyalog APL:
APL does not have true/false as a dedicated "logical values", but uses 0 or 1 to indicate false/true. So this can be done with a simple calculation: employed multiplied by not(vacation):
{⍺×~⍵}
Here's the table of all possible results:
0 1∘.{⍺×~⍵}0 1
0 0
1 0
OK, I cheated: my fn uses the "dyadic" syntax where you provide a left arg (employed) and a right argument (vacation). I've also written an "enhanced" version that can deal with both syntaxes:
A solution in Dyalog APL:
APL does not have true/false as a dedicated "logical values", but uses 0 or 1 to indicate false/true. So this can be done with a simple calculation:
employed multiplied by not(vacation)
:Here's the table of all possible results:
OK, I cheated: my fn uses the "dyadic" syntax where you provide a left arg (employed) and a right argument (vacation). I've also written an "enhanced" version that can deal with both syntaxes:
`
Try it online!