updated the Slang docs...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-12-30 03:51:28 +04:00
parent fc3e135d70
commit c725c089d4

View File

@ -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 -- ... | )',