 GENERIC: toggle-coverage ( object -- )
 
 M: string toggle-coverage
-    words [ toggle-coverage ] each ;
+    [ toggle-coverage ] change-vocabulary-coverage ;
 
 M: word toggle-coverage
     dup "coverage" word-prop [


C: <coverage> coverage

: private-vocab-name ( string -- string' )
    ".private" ?tail drop ".private" append ;

GENERIC: coverage-on ( object -- )

GENERIC: coverage-off ( object -- )

: change-coverage ( string quot -- )
    over ".private" tail? [
        [ words ] dip each
    ] [

        [ [ words ] dip each ] 2bi
    ] if ; inline

PRIVATE>

M: string coverage-on
    [ coverage-on ] change-vocabulary-coverage ;

M: string coverage-off ( vocabulary -- )
    [ coverage-off ] change-vocabulary-coverage ;

M: word coverage-on ( word -- )
    H{ } clone [ "coverage" set-word-prop ] 2keep
