mirror of
https://github.com/flynx/Course-JavaScript.git
synced 2025-10-29 11:00:10 +00:00
added the rest of the comparison operations...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
de9737ec55
commit
6f24dc981f
@ -632,13 +632,17 @@ var BOOTSTRAP = [
|
||||
':: . ( x -- ) [ drop ]',
|
||||
':: .. ( x -- ) [ print drop ]',
|
||||
'',
|
||||
':: ne ( a -- b ) [ eq not ]',
|
||||
':: isT ( a -- b ) [ not not true eq ]',
|
||||
':: isF ( a -- b ) [ not isT ]',
|
||||
'',
|
||||
'-- we already have gt and eq, now let\'s define the rest...',
|
||||
':: ne ( a b -- c ) [ eq not ]',
|
||||
':: lt ( a b -- c ) [ dup2 eq not rot gt not tor and ]',
|
||||
':: ge ( a b -- c ) [ dup2 eq rot gt or ]',
|
||||
':: le ( a b -- c ) [ gt not ]',
|
||||
'',
|
||||
':: inc ( a -- b ) [ 1 add ]',
|
||||
':: dec ( a -- b ) [ 1 sub ]',
|
||||
'',
|
||||
':: ! ( a -- b ) [ [ dup 1 ne ] ? [ dup 1 sub ! mul ] ]',
|
||||
'',
|
||||
'',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user