Don't store f in vocab root cache
parent
8c46a3d56f
commit
a8560f0f57
|
@ -34,10 +34,11 @@ SYMBOL: root-cache
|
||||||
|
|
||||||
H{ } clone root-cache set-global
|
H{ } clone root-cache set-global
|
||||||
|
|
||||||
|
: (find-vocab-root) ( name -- path/f )
|
||||||
|
vocab-roots get swap [ vocab-dir? ] curry find nip ;
|
||||||
|
|
||||||
: find-vocab-root ( vocab -- path/f )
|
: find-vocab-root ( vocab -- path/f )
|
||||||
vocab-name root-cache get [
|
vocab-name dup root-cache get at [ ] [ (find-vocab-root) ] ?if ;
|
||||||
vocab-roots get swap [ vocab-dir? ] curry find nip
|
|
||||||
] cache ;
|
|
||||||
|
|
||||||
: vocab-append-path ( vocab path -- newpath )
|
: vocab-append-path ( vocab path -- newpath )
|
||||||
swap find-vocab-root dup [ prepend-path ] [ 2drop f ] if ;
|
swap find-vocab-root dup [ prepend-path ] [ 2drop f ] if ;
|
||||||
|
|
Loading…
Reference in New Issue