diff --git a/Slang/slang.js b/Slang/slang.js index ff6efd2..74137d5 100755 --- a/Slang/slang.js +++ b/Slang/slang.js @@ -516,10 +516,17 @@ var BOOTSTRAP = [ ':: isT ( a -- b ) [ not not true eq ]', ':: isF ( a -- b ) [ not isT ]', '', -'-- this defines a classic [ cond ] [ A ] [ B ] if word... (a bit too polish IMHO)', +'-- Classic conditional word:', +'-- [ cond ] [ A ] [ B ] if', +'--', +'-- A bit too "polish" in my view ;)', ':: if ( cond a b -- ... ) [ rot rot exec isT tor and tor or exec ]', '', -'-- helpers for the ternary operator...', +'-- Ternary operator, this can take two forms:', +'-- COND ? A', +'-- COND ? A else B', +'--', +'-- We will define this in stages, first the helpers:', '-- run then block and drop \'else B\' if it exists...', ':: _run_then ( a x | -- ... | x )', ' ( a else | b -- ... | )', @@ -532,6 +539,7 @@ var BOOTSTRAP = [ ' [ drop dup \\ else eq [ drop \\ exec _swap 4 ] and', ' [ 1 _push 2 ] or', ' b2s 0 _swapN ]', +'-- And now the main operator...', '-- NOTE: this may actually have one of three stack effects...', ':: ? ( c | a -- | )', ' ( c | a -- ... | )',