Paste: Generate a USING: line

Author: elasticdog
Mode: factor
Date: Fri, 31 Oct 2008 02:43:45
Plain Text |
USING: arrays kernel sequences sets sorting tools.vocabs.browser ;

: using-line ( vocab -- str )
    dup ".private" append tuck [ vocab-uses ] bi@ append
    prune remove natural-sort "USING:" prefix ";" suffix " " join ;

Annotation: tweak for edge case when private vocab uses the public vocab's words

Author: elasticdog
Mode: factor
Date: Fri, 31 Oct 2008 03:32:26
Plain Text |
USING: kernel sequences sets sorting tools.vocabs.browser ;

: using-line ( vocab -- str )
    dup ".private" append 2dup [ vocab-uses ] bi@
    append prune remove remove natural-sort
    "USING:" prefix ";" suffix " " join ;

New Annotation

Summary:
Author:
Mode:
Body: