changed the .. word in slang to an infix range/2...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-06-03 15:14:12 +04:00
parent 1db04d7f16
commit 6a4d1e68f1

View File

@ -663,7 +663,7 @@ var BOOTSTRAP = [
'-- misc...', '-- misc...',
'', '',
':: . ( x -- ) [ drop ]', ':: . ( x -- ) [ drop ]',
':: .. ( x -- ) [ print drop ]', //':: .. ( x -- ) [ print drop ]',
'', '',
':: true? ( a -- b ) [ not not true eq ]', ':: true? ( a -- b ) [ not not true eq ]',
':: false? ( a -- b ) [ not true? ]', ':: false? ( a -- b ) [ not true? ]',
@ -855,10 +855,13 @@ var BOOTSTRAP = [
'-- Mandatory "hello word" word example...', '-- Mandatory "hello word" word example...',
':: hi ( -- ) [ "Hello World!" print drop ]', ':: hi ( -- ) [ "Hello World!" print drop ]',
'', '',
'-- Create a block containg a range of n numbers form 0 and adding s to', '-- Create a block containg a range of numbers from f to t, inclusive...',
'-- each next number...', ':: range/2 ( f t -- b )',
':: range/2 ( n s -- b )', ' [ dup2 swap sub swap . inc range swap [] swap push \\ + 0 before map ]',
' [ swap range swap [] swap push \\ * 0 before map ]', '',
'-- this will enable us to create ranges via 0 .. 4',
'infix: .. range/2',
'',
//':: range/3 ( a n s -- b )', //':: range/3 ( a n s -- b )',
//' [ swap range swap [] swap push \\ * 0 before map ]', //' [ swap range swap [] swap push \\ * 0 before map ]',
'', '',