Added NAND and NOR as nand: and nor:, and butNot: as logical non-implication.
authorBrian T. Rice <briantrice@gmail.com>
Sat, 17 Apr 2010 16:50:41 +0000 (09:50 -0700)
committerBrian T. Rice <briantrice@gmail.com>
Sat, 17 Apr 2010 17:05:20 +0000 (10:05 -0700)
src/core/boolean.slate

index 49bfd12..bfa0c4e 100644 (file)
@@ -35,6 +35,20 @@ x@(Boolean traits) xor: y@(Boolean traits) [x eqv: y not].
 "Implication (not entailment)."
 x@(Boolean traits) --> y@(Boolean traits) [x not \/ y].
 
+"Reverse implication (not entailment)."
+x@(Boolean traits) <-- y@(Boolean traits) [x \/ y not].
+
+"Boolean NAND, the negation of AND."
+x@(Boolean traits) nand: y@(Boolean traits) [(x /\ y) not].
+
+"Boolean NOR, the negation of OR."
+x@(Boolean traits) nor: y@(Boolean traits) [(x \/ y) not].
+
+"Boolean XNOR, the negation of EQV."
+x@(Boolean traits) xnor: y@(Boolean traits) [x ~== y].
+
+x@(Boolean traits) butNot: y@(Boolean traits) [x /\ y not].
+
 bool@(Boolean traits) and: block
 "Conditional AND, but it can return the value of the block."
 [bool ifTrue: block ifFalse: [False]].