Further cleanups
parent
0d0581fc34
commit
b150e155d9
|
@ -28,3 +28,6 @@ USING: arrays generic kernel sequences ;
|
||||||
|
|
||||||
: sum ( seq -- n ) 0 [ + ] reduce ;
|
: sum ( seq -- n ) 0 [ + ] reduce ;
|
||||||
: product ( seq -- n ) 1 [ * ] reduce ;
|
: product ( seq -- n ) 1 [ * ] reduce ;
|
||||||
|
|
||||||
|
: infimum ( seq -- n ) 1./0. [ min ] reduce ;
|
||||||
|
: supremum ( seq -- n ) -1./0. [ max ] reduce ;
|
||||||
|
|
|
@ -109,9 +109,6 @@ M: word unxref-word* drop ;
|
||||||
: define-temp ( quot -- word )
|
: define-temp ( quot -- word )
|
||||||
gensym [ swap define-compound ] keep ;
|
gensym [ swap define-compound ] keep ;
|
||||||
|
|
||||||
: completions ( substring words -- seq )
|
|
||||||
[ word-name subseq? ] subset-with ;
|
|
||||||
|
|
||||||
SYMBOL: bootstrapping?
|
SYMBOL: bootstrapping?
|
||||||
|
|
||||||
: word ( -- word ) \ word get-global ;
|
: word ( -- word ) \ word get-global ;
|
||||||
|
|
|
@ -159,11 +159,6 @@ HELP: define-temp "( quot -- word )"
|
||||||
{ $code "[ 2 2 + . ] define-temp execute" }
|
{ $code "[ 2 2 + . ] define-temp execute" }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
HELP: completions "( string words -- seq )"
|
|
||||||
{ $values { "string" "a string" } { "words" "a sequence of words" } { "seq" "a sequence of words" } }
|
|
||||||
{ $description "Outputs a sequence of words whose name contains " { $snippet "string" } "." }
|
|
||||||
{ $examples "This word is used to implement " { $link apropos } "." } ;
|
|
||||||
|
|
||||||
HELP: definer "( word -- definer )"
|
HELP: definer "( word -- definer )"
|
||||||
{ $values { "word" "a word" } { "definer" "a word" } }
|
{ $values { "word" "a word" } { "definer" "a word" } }
|
||||||
{ $description "Outputs the parsing word that defines the given word." }
|
{ $description "Outputs the parsing word that defines the given word." }
|
||||||
|
|
Loading…
Reference in New Issue