From 540bdd97bdabed94d068ee4dab2f680aa71bb4c3 Mon Sep 17 00:00:00 2001 From: sforman Date: Sun, 30 Jul 2023 15:51:29 -0700 Subject: [PATCH] Sort out the and/or/... ops. --- README.md | 14 ++++++++++++++ implementations/Elm/src/Joy.elm | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2bcad62..c8e263a 100644 --- 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 diff --git a/implementations/Elm/src/Joy.elm b/implementations/Elm/src/Joy.elm index 72d7532..0099016 100644 --- a/implementations/Elm/src/Joy.elm +++ b/implementations/Elm/src/Joy.elm @@ -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" ->