Hello,

Recently I've wanted a way to find out which vocabularies use a particular 
vocabulary.

Am I missing something? Or is there not yet a way to do this?

This is what I used to find the answer:

: uses-vocab ( vocab -- seq )
  words
  [ usage ] map
  flatten
  [ word? ] subset
  [ word-vocabulary ] map
  [ ] subset
  unique ;

I couldn't find a 'unique' word (like UNIX 'uniq'). Here's what I used:

: remove-extras ( seq obj -- seq ) dup >r remove r> prefix ;

: unique ( seq -- seq ) dup [ remove-extras ] each ;

Ed

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to