core, basis: Don't use the IN: foo.private feature and undocument it.
It only works well when you are loading code dynamically.db4
parent
527c4ea2f8
commit
69ee8b9190
|
|
@ -102,8 +102,6 @@ HELP: each-combination
|
||||||
{ $description "Applies the quotation to each combination of " { $snippet "seq" } " choosing " { $snippet "k" } " elements, in order." } ;
|
{ $description "Applies the quotation to each combination of " { $snippet "seq" } " choosing " { $snippet "k" } " elements, in order." } ;
|
||||||
|
|
||||||
|
|
||||||
IN: math.combinatorics.private
|
|
||||||
|
|
||||||
HELP: factoradic
|
HELP: factoradic
|
||||||
{ $values { "n" integer } { "factoradic" sequence } }
|
{ $values { "n" integer } { "factoradic" sequence } }
|
||||||
{ $description "Converts a positive integer " { $snippet "n" } " to factoradic form. The factoradic of an integer is its representation based on a mixed radix numerical system that corresponds to the values of " { $snippet "n" } " factorial." }
|
{ $description "Converts a positive integer " { $snippet "n" } " to factoradic form. The factoradic of an integer is its representation based on a mixed radix numerical system that corresponds to the values of " { $snippet "n" } " factorial." }
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
USING: accessors kernel kernel.private math math.private
|
USING: accessors kernel kernel.private math math.private
|
||||||
math.functions arrays math.functions.private sequences
|
math.functions arrays math.functions.private sequences
|
||||||
sequences.private parser ;
|
sequences.private parser ;
|
||||||
IN: math.complex.private
|
IN: math.complex
|
||||||
|
|
||||||
|
<PRIVATE
|
||||||
|
|
||||||
M: real real-part ; inline
|
M: real real-part ; inline
|
||||||
M: real imaginary-part drop 0 ; inline
|
M: real imaginary-part drop 0 ; inline
|
||||||
|
|
@ -43,3 +45,5 @@ USE: prettyprint.custom
|
||||||
M: complex pprint* pprint-object ;
|
M: complex pprint* pprint-object ;
|
||||||
M: complex pprint-delims drop \ C{ \ } ;
|
M: complex pprint-delims drop \ C{ \ } ;
|
||||||
M: complex >pprint-sequence >rect 2array ;
|
M: complex >pprint-sequence >rect 2array ;
|
||||||
|
|
||||||
|
PRIVATE>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
USE: kernel
|
USE: kernel
|
||||||
IN: destructors.private
|
IN: destructors
|
||||||
|
|
||||||
|
<PRIVATE
|
||||||
|
|
||||||
: register-disposable ( obj -- ) drop ; inline
|
: register-disposable ( obj -- ) drop ; inline
|
||||||
|
|
||||||
: unregister-disposable ( obj -- ) drop ; inline
|
: unregister-disposable ( obj -- ) drop ; inline
|
||||||
|
|
||||||
|
PRIVATE>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
! Copyright (C) 2004, 2010 Slava Pestov, Joe Groff.
|
! Copyright (C) 2004, 2010 Slava Pestov, Joe Groff.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel math math.private math.order ;
|
USING: kernel math math.private math.order ;
|
||||||
IN: math.floats.private
|
IN: math.floats
|
||||||
|
|
||||||
|
<PRIVATE
|
||||||
: float-unordered? ( x y -- ? ) [ fp-nan? ] either? ;
|
: float-unordered? ( x y -- ? ) [ fp-nan? ] either? ;
|
||||||
: float-min ( x y -- z ) [ float< ] most ; foldable
|
: float-min ( x y -- z ) [ float< ] most ; foldable
|
||||||
: float-max ( x y -- z ) [ float> ] most ; foldable
|
: float-max ( x y -- z ) [ float> ] most ; foldable
|
||||||
|
|
@ -79,3 +80,5 @@ M: float fp-sign double>bits 63 bit? ; inline
|
||||||
M: float neg? fp-sign ; inline
|
M: float neg? fp-sign ; inline
|
||||||
|
|
||||||
M: float abs double>bits 63 2^ bitnot bitand bits>double ; inline
|
M: float abs double>bits 63 2^ bitnot bitand bits>double ; inline
|
||||||
|
|
||||||
|
PRIVATE>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: combinators kernel kernel.private math math.order
|
USING: combinators kernel kernel.private math math.order
|
||||||
math.private ;
|
math.private ;
|
||||||
IN: math.integers.private
|
IN: math.integers
|
||||||
|
|
||||||
|
<PRIVATE
|
||||||
|
|
||||||
: fixnum-min ( x y -- z ) [ fixnum< ] most ; foldable
|
: fixnum-min ( x y -- z ) [ fixnum< ] most ; foldable
|
||||||
: fixnum-max ( x y -- z ) [ fixnum> ] most ; foldable
|
: fixnum-max ( x y -- z ) [ fixnum> ] most ; foldable
|
||||||
|
|
@ -186,3 +188,5 @@ M: fixnum /f
|
||||||
{ bignum } declare 1 >bignum bignum/f ;
|
{ bignum } declare 1 >bignum bignum/f ;
|
||||||
|
|
||||||
M: bignum >float bignum>float ; inline
|
M: bignum >float bignum>float ; inline
|
||||||
|
|
||||||
|
PRIVATE>
|
||||||
|
|
|
||||||
|
|
@ -867,17 +867,6 @@ HELP: <PRIVATE
|
||||||
""
|
""
|
||||||
": fac ( n -- n! ) 1 swap (fac) ;"
|
": fac ( n -- n! ) 1 swap (fac) ;"
|
||||||
}
|
}
|
||||||
"The above is equivalent to:"
|
|
||||||
{ $code
|
|
||||||
"IN: factorial.private"
|
|
||||||
""
|
|
||||||
": (fac) ( accum n -- n! )"
|
|
||||||
" dup 1 <= [ drop ] [ [ * ] keep 1 - (fac) ] if ;"
|
|
||||||
""
|
|
||||||
"IN: factorial"
|
|
||||||
""
|
|
||||||
": fac ( n -- n! ) 1 swap (fac) ;"
|
|
||||||
}
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
HELP: PRIVATE>
|
HELP: PRIVATE>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue