using primitives -- To load this file into Disco, (1) make sure you start disco from -- the same folder where this file is located, then (2) type -- -- :load xor.disco -- -- at the Disco> prompt. Let me know if you have any difficulty! -- -- You can edit this file using any text editor, for example, Notepad -- on Windows, or any code editor like VSCode or Atom. Your computer -- will not know what a .disco file is, but that's OK. It's just a -- plain text file. ||| xor computes the *exclusive or* of its inputs; it is true when ||| exactly one of its inputs is true. That is, xor(x,y) should be ||| true when one or the other of x or y is true, but false if either ||| both x and y are false, or both x and y are true. -- The below lines beginning with !!! are tests. Disco will check each -- of these when loading the file. You must fill in the definition of xor -- so that all these tests are satisfied. !!! xor(false, false) == false !!! xor(false, true ) == true !!! xor(true , false) == true !!! xor(true , true ) == false xor : Bool * Bool -> Bool -- This says that xor takes a pair of true/false values as input -- and returns one as output xor(x,y) = $crash "xor is not defined!" -- Delete $crash and the following message above, and replace it -- with a definition of xor, making use of other built-in operators in Disco -- such as /\, \/, ->, not. You will know that you were successful if :loading -- this file at the Disco prompt gives a message saying "xor: OK".