Move math.text to math.text.english for localization
parent
4c6cb412f3
commit
947e64c630
|
@ -1,5 +1,5 @@
|
|||
USING: help.markup help.syntax math strings ;
|
||||
IN: math.text
|
||||
IN: math.text.english
|
||||
|
||||
HELP: number>text
|
||||
{ $values { "n" integer } { "str" string } }
|
|
@ -1,4 +1,4 @@
|
|||
USING: math.functions math.text tools.test ;
|
||||
USING: math.functions math.text.english tools.test ;
|
||||
IN: temporary
|
||||
|
||||
[ "Zero" ] [ 0 number>text ] unit-test
|
|
@ -2,7 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: combinators.lib kernel math math.functions math.parser namespaces
|
||||
sequences splitting sequences.lib ;
|
||||
IN: math.text
|
||||
IN: math.text.english
|
||||
|
||||
<PRIVATE
|
||||
|
||||
|
@ -26,10 +26,7 @@ IN: math.text
|
|||
|
||||
SYMBOL: and-needed?
|
||||
: set-conjunction ( seq -- )
|
||||
first {
|
||||
[ dup 100 < ]
|
||||
[ dup 0 > ]
|
||||
} && and-needed? set drop ;
|
||||
first { [ dup 100 < ] [ dup 0 > ] } && and-needed? set drop ;
|
||||
|
||||
: negative-text ( n -- str )
|
||||
0 < "Negative " "" ? ;
|
||||
|
@ -100,4 +97,3 @@ PRIVATE>
|
|||
] [
|
||||
[ (number>text) ] with-scope
|
||||
] if ;
|
||||
|
|
@ -0,0 +1 @@
|
|||
Convert integers to English text
|
|
@ -1 +0,0 @@
|
|||
Convert integers to text
|
|
@ -1,6 +1,6 @@
|
|||
! Copyright (c) 2007 Aaron Schaefer.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: combinators.lib kernel math.ranges math.text sequences strings ;
|
||||
USING: combinators.lib kernel math.ranges math.text.english sequences strings ;
|
||||
IN: project-euler.017
|
||||
|
||||
! http://projecteuler.net/index.php?section=problems&id=17
|
||||
|
|
Loading…
Reference in New Issue