It only works well when you are loading code dynamically.
{ $description "Applies the quotation to each combination of " { $snippet "seq" } " choosing " { $snippet "k" } " elements, in order." } ;
-IN: math.combinatorics.private
-
HELP: factoradic
{ $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." }
USING: accessors kernel kernel.private math math.private
math.functions arrays math.functions.private sequences
sequences.private parser ;
-IN: math.complex.private
+IN: math.complex
+
+<PRIVATE
M: real real-part ; inline
M: real imaginary-part drop 0 ; inline
M: complex pprint* pprint-object ;
M: complex pprint-delims drop \ C{ \ } ;
M: complex >pprint-sequence >rect 2array ;
+
+PRIVATE>
USE: kernel
-IN: destructors.private
+IN: destructors
+
+<PRIVATE
: register-disposable ( obj -- ) drop ; inline
: unregister-disposable ( obj -- ) drop ; inline
+
+PRIVATE>
! Copyright (C) 2004, 2010 Slava Pestov, Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math math.private math.order ;
-IN: math.floats.private
+IN: math.floats
+<PRIVATE
: float-unordered? ( x y -- ? ) [ fp-nan? ] either? ;
: float-min ( x y -- z ) [ float< ] most ; foldable
: float-max ( x y -- z ) [ float> ] most ; foldable
M: float neg? fp-sign ; inline
M: float abs double>bits 63 2^ bitnot bitand bits>double ; inline
+
+PRIVATE>
! See http://factorcode.org/license.txt for BSD license.
USING: combinators kernel kernel.private math math.order
math.private ;
-IN: math.integers.private
+IN: math.integers
+
+<PRIVATE
: fixnum-min ( x y -- z ) [ fixnum< ] most ; foldable
: fixnum-max ( x y -- z ) [ fixnum> ] most ; foldable
{ bignum } declare 1 >bignum bignum/f ;
M: bignum >float bignum>float ; inline
+
+PRIVATE>
""
": 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>