 : (child-vocabs) ( root prefix -- vocabs )
     ensure-vocab-root/prefix
     [ vocab-dir append-path dup exists? [ vocab-subdirs ] [ drop { } ] if ]
-    [ nip [ '[ [ _ "." ] dip 3append ] map ] unless-empty ]
-    [ drop '[ _ over vocab-dir? [ >vocab-link ] [ <vocab-prefix> ] if ] map ]
+    [ nip [ "." append '[ _ prepend ] map! ] unless-empty ]
+    [ drop '[ _ over vocab-dir? [ >vocab-link ] [ <vocab-prefix> ] if ] map! ]
     2tri ;
 
 : ((child-vocabs-recursive)) ( root prefix -- )
-    dupd vocab-name (child-vocabs)
-    [ dup , ((child-vocabs-recursive)) ] with each ;
+    dupd vocab-name (child-vocabs) [ % ] keep
+    [ ((child-vocabs-recursive)) ] with each ;
 
 : (child-vocabs-recursive) ( root prefix -- seq )
     [ ((child-vocabs-recursive)) ] { } make ;

: no-rooted ( seq -- seq' ) [ find-vocab-root not ] filter ;

: one-level-only? ( name prefix -- ? )
    ?head [ "." split1 nip not ] dip and ;

: unrooted-child-vocabs ( prefix -- seq )
    [ vocabs no-rooted ] dip


: child-vocabs ( prefix -- assoc )
    [ [ vocab-roots get ] dip '[ dup _ (child-vocabs) ] { } map>assoc ]
    [ unrooted-child-vocabs [ lookup-vocab ] map! f swap 2array ]
    bi suffix ;

: all-vocabs ( -- assoc )
