some cleanup.
parent
2f7e8c0352
commit
4eeafea8be
|
@ -5,7 +5,7 @@ biassocs ascii namespaces arrays make assocs interval-maps sets ;
|
||||||
IN: simple-flat-file
|
IN: simple-flat-file
|
||||||
|
|
||||||
: drop-comments ( seq -- newseq )
|
: drop-comments ( seq -- newseq )
|
||||||
[ "#@" split first ] map harvest ;
|
[ "#@" split1 drop ] map harvest ;
|
||||||
|
|
||||||
: split-column ( line -- columns )
|
: split-column ( line -- columns )
|
||||||
" \t" split harvest 2 short head 2 f pad-tail ;
|
" \t" split harvest 2 short head 2 f pad-tail ;
|
||||||
|
|
|
@ -20,10 +20,10 @@ M: readline-reader prompt.
|
||||||
>>prompt drop ;
|
>>prompt drop ;
|
||||||
|
|
||||||
: word-names ( -- strs )
|
: word-names ( -- strs )
|
||||||
all-words [ name>> ] map ;
|
all-words [ name>> ] map! ;
|
||||||
|
|
||||||
: vocab-names ( -- strs )
|
: vocab-names ( -- strs )
|
||||||
all-vocabs-recursive filter-vocabs [ name>> ] map ;
|
all-vocabs-recursive filter-vocabs [ name>> ] map! ;
|
||||||
|
|
||||||
: prefixed-words ( prefix -- words )
|
: prefixed-words ( prefix -- words )
|
||||||
'[ _ head? ] word-names swap filter ;
|
'[ _ head? ] word-names swap filter ;
|
||||||
|
@ -36,7 +36,7 @@ M: readline-reader prompt.
|
||||||
|
|
||||||
: get-completions ( prefix -- completions )
|
: get-completions ( prefix -- completions )
|
||||||
completions tget dup [ nip ] [
|
completions tget dup [ nip ] [
|
||||||
drop current-line " " split first
|
drop current-line " " split1 drop
|
||||||
"USING:" = [
|
"USING:" = [
|
||||||
prefixed-vocabs
|
prefixed-vocabs
|
||||||
] [
|
] [
|
||||||
|
|
Loading…
Reference in New Issue