vocabs: faster child-vocab?.
parent
a718127fd1
commit
88f163d28f
|
@ -111,8 +111,13 @@ ERROR: no-vocab name ;
|
||||||
sift ;
|
sift ;
|
||||||
|
|
||||||
: child-vocab? ( prefix name -- ? )
|
: child-vocab? ( prefix name -- ? )
|
||||||
2dup = pick empty? or
|
swap [ drop t ] [
|
||||||
[ 2drop t ] [ swap CHAR: . suffix head? ] if ;
|
2dup = [ 2drop t ] [
|
||||||
|
2dup head? [
|
||||||
|
length swap ?nth CHAR: . =
|
||||||
|
] [ 2drop f ] if
|
||||||
|
] if
|
||||||
|
] if-empty ;
|
||||||
|
|
||||||
: child-vocabs ( vocab -- seq )
|
: child-vocabs ( vocab -- seq )
|
||||||
vocab-name vocabs [ child-vocab? ] with filter ;
|
vocab-name vocabs [ child-vocab? ] with filter ;
|
||||||
|
|
Loading…
Reference in New Issue