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