vocabs.hierarchy: a little bit cleaner.

db4
John Benediktsson 2014-06-03 09:45:22 -07:00
parent 7190ea5dc8
commit bdb2d476c1
1 changed files with 6 additions and 3 deletions

View File

@ -15,13 +15,16 @@ M: vocab-prefix vocab-name name>> ;
<PRIVATE
: vocab-subdirs ( dir -- dirs )
directory-entries [
: visible-dirs ( seq -- seq' )
[
{
[ type>> +directory+ = ]
[ name>> "." head? not ]
} 1&&
] filter [ name>> ] map! natural-sort ;
] filter ;
: vocab-subdirs ( dir -- dirs )
directory-entries visible-dirs [ name>> ] map! natural-sort ;
: vocab-dir? ( root name -- ? )
over