mirror of
				https://github.com/flynx/Course-JavaScript.git
				synced 2025-10-31 12:00:08 +00:00 
			
		
		
		
	fixed some minor bugs + some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									01a0b7872a
								
							
						
					
					
						commit
						2596b93e84
					
				| @ -365,7 +365,7 @@ var NAMESPACE = { | ||||
| 		return context.stack.pop() * context.stack.pop() | ||||
| 	}, | ||||
| 	'div': function(context){ | ||||
| 		return context.stack.pop() / context.stack.pop() | ||||
| 		return 1/context.stack.pop() * context.stack.pop() | ||||
| 	}, | ||||
| 
 | ||||
| 	// block/list operations...
 | ||||
| @ -709,9 +709,8 @@ var BOOTSTRAP = [ | ||||
| '	-- empty list, sum is 0...', | ||||
| '	[ len 0 eq ] ?', | ||||
| '		[ . 0 ]', | ||||
| '	else', | ||||
| '	-- sum of list of len 1 is it\'s content, so just pop it...', | ||||
| '		[ [ len 1 eq ] ?', | ||||
| '	else [ [ len 1 eq ] ?', | ||||
| '		[ pop swap . ]', | ||||
| '	-- and now recursively sum up elements till the list is 1 in length...', | ||||
| '	else', | ||||
| @ -728,7 +727,7 @@ var BOOTSTRAP = [ | ||||
| '	[', | ||||
| '		-- format the word definition...', | ||||
| '		--		NAME WORD	->	:: NAME WORD', | ||||
| '		s2b \\ :: -3 before b2s', | ||||
| '		s2b \\ :: -2 before b2s', | ||||
| '', | ||||
| '		-- our template...', | ||||
| '		-- exec the left side...', | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user