Add comment explaining what's going on

db4
Slava Pestov 2008-11-23 02:46:43 -06:00
parent a4d9cdfeb3
commit 6466ebaed7
1 changed files with 15 additions and 3 deletions

View File

@ -53,11 +53,23 @@ DEFER: if
pick [ roll 2drop call ] [ 2nip call ] if ; inline
! Slippers
: slip ( quot x -- x ) [ call ] dip ;
: slip ( quot x -- x )
#! 'slip' and 'dip' can be defined in terms of each other
#! because the JIT special-cases a 'dip' preceeded by
#! a literal quotation.
[ call ] dip ;
: 2slip ( quot x y -- x y ) [ call ] 2dip ;
: 2slip ( quot x y -- x y )
#! '2slip' and '2dip' can be defined in terms of each other
#! because the JIT special-cases a '2dip' preceeded by
#! a literal quotation.
[ call ] 2dip ;
: 3slip ( quot x y z -- x y z ) [ call ] 3dip ;
: 3slip ( quot x y z -- x y z )
#! '3slip' and '3dip' can be defined in terms of each other
#! because the JIT special-cases a '3dip' preceeded by
#! a literal quotation.
[ call ] 3dip ;
: dip ( x quot -- x ) swap slip ; inline