views:

10

answers:

0

I know J has a primitive that works like xor ~:, but this is really a not equal to (!=)

I can make it function like a bitwise xor by saying:xor =: 4 : '#.((#:x)~:(#:y))' within a verb definition, but this only works when the binary representations of the numbers are the same length. Is there anything I can do short of making a full-out verb that uses if statements to make the lists of the same size to make a bitwise xor.

In case you're wondering, I'm asking because I want to recreate my Nim-solving program that I got working in Java in J.