namespaces: Add with-variable-on/off combinators.

char-rename
Doug Coleman 2017-05-29 12:36:16 -05:00
parent 5b1198e20c
commit e6d0c06f17
1 changed files with 2 additions and 0 deletions

View File

@ -67,4 +67,6 @@ PRIVATE>
: with-variables ( ns quot -- ) swap >n call ndrop ; inline
: with-scope ( quot -- ) 5 <hashtable> swap with-variables ; inline
: with-variable ( value key quot -- ) [ associate ] dip with-variables ; inline
: with-variable-on ( key quot -- ) [ t swap associate ] dip with-variables ; inline
: with-variable-off ( key quot -- ) [ f swap associate ] dip with-variables ; inline
: with-global ( quot -- ) [ global ] dip with-variables ; inline