OSDN Git Service

Sort out the and/or/... ops.
authorsforman <sforman@hushmail.com>
Sun, 30 Jul 2023 22:51:29 +0000 (15:51 -0700)
committersforman <sforman@hushmail.com>
Sun, 30 Jul 2023 22:51:29 +0000 (15:51 -0700)
README.md
implementations/Elm/src/Joy.elm

index 2bcad62..c8e263a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -267,6 +267,20 @@ dialect of Joy are defined in terms of these:
     /\ \/ _\/_ (These are the logical ops.  Booleans)
 
 
+
++-----+-------------------+----------------+------------------------------+
+|     | Logical (Boolean) | Bitwise (Ints) | Short-Circuiting Combinators |
++-----+-------------------+----------------+------------------------------+
+| AND |       /\          |     &&         |          and                 |
++-----+-------------------+----------------+------------------------------+
+|  OR |       \/          |     ||         |           or                 |
++-----+-------------------+----------------+------------------------------+
+| XOR |     _\/_          |     xor        |                              |
++-----+-------------------+----------------+------------------------------+
+| NOT |     not           |      ~         |                              |
++-----+-------------------+----------------+------------------------------+
+
+
 --------------------------------------------------
 
 Copyright © 2014 - 2023 Simon Forman
index 72d7532..0099016 100644 (file)
@@ -201,10 +201,10 @@ joy_function_eval symbol stack expression =
         "=" ->
             joy_comparison_op (==) stack expression
 
-        "and" ->
+        "&&" ->
             joy_binary_math_op Bitwise.and stack expression
 
-        "or" ->
+        "||" ->
             joy_binary_math_op Bitwise.or stack expression
 
         "xor" ->