mirror of
				https://github.com/flynx/Course-JavaScript.git
				synced 2025-10-31 12:00:08 +00:00 
			
		
		
		
	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:
		
							parent
							
								
									1db04d7f16
								
							
						
					
					
						commit
						6a4d1e68f1
					
				| @ -663,7 +663,7 @@ var BOOTSTRAP = [ | ||||
| '-- misc...', | ||||
| '', | ||||
| ':: . ( x -- ) [ drop ]', | ||||
| ':: .. ( x -- ) [ print drop ]', | ||||
| //':: .. ( x -- ) [ print drop ]',
 | ||||
| '', | ||||
| ':: true? ( a -- b ) [ not not true eq ]', | ||||
| ':: false? ( a -- b ) [ not true? ]', | ||||
| @ -855,10 +855,13 @@ var BOOTSTRAP = [ | ||||
| '-- Mandatory "hello word" word example...', | ||||
| ':: hi ( -- ) [ "Hello World!" print drop ]', | ||||
| '', | ||||
| '-- Create a block containg a range of n numbers form 0 and adding s to', | ||||
| '-- each next number...', | ||||
| ':: range/2 ( n s -- b )', | ||||
| '		[ swap range swap [] swap push \\ * 0 before map ]', | ||||
| '-- Create a block containg a range of numbers from f to t, inclusive...', | ||||
| ':: range/2 ( f t -- b )', | ||||
| '		[ dup2 swap sub swap . inc 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 )',
 | ||||
| //'		[ swap range swap [] swap push \\ * 0 before map ]',
 | ||||
| '', | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user