From 1db04d7f168abb5ac9c45dbd9551515cbb495c17 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 13 Feb 2014 02:58:15 +0400 Subject: [PATCH] updated the logic operators -- thanks to Anna Puchkina for pointing out that my implementation was way too over-comlicated ;) Signed-off-by: Alex A. Naanou --- Slang/slang.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Slang/slang.js b/Slang/slang.js index 5ea2e4d..ff624f1 100755 --- a/Slang/slang.js +++ b/Slang/slang.js @@ -670,8 +670,8 @@ var BOOTSTRAP = [ '', '-- we already have gt and eq, now let\'s define the rest...', ':: ne ( a b -- c ) [ eq not ]', -':: lt ( a b -- c ) [ dup2 eq not rot gt not tor and ]', -':: ge ( a b -- c ) [ dup2 eq rot gt tor or ]', +':: lt ( a b -- c ) [ swap gt ]', +':: ge ( a b -- c ) [ lt not ]', ':: le ( a b -- c ) [ gt not ]', '', ':: inc ( a -- b ) [ 1 add ]',