]> gitweb.factorcode.org Git - factor.git/commitdiff
money: more of this should be public.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 19 Apr 2016 14:29:42 +0000 (07:29 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 19 Apr 2016 14:29:42 +0000 (07:29 -0700)
extra/money/money.factor

index 9db6b19d6b30a4d3fdc6b644f8b80302419c34ce..a0ac13246d485292298b8ffcaaad0c0e6ac2941e 100644 (file)
@@ -7,8 +7,6 @@ IN: money
 SYMBOL: currency-token
 CHAR: $ currency-token set-global
 
-<PRIVATE
-
 : dollars/cents ( dollars -- dollars cents )
     100 * 100 /mod round ;
 
@@ -17,8 +15,6 @@ CHAR: $ currency-token set-global
     [ <reversed> 3 group "," join <reversed> ]
     [ 2 CHAR: 0 pad-head ] bi* "." glue ;
 
-PRIVATE>
-
 : money>string ( number -- string )
     dollars/cents format-money currency-token get prefix ;
 
@@ -26,8 +22,6 @@ PRIVATE>
 
 ERROR: not-an-integer x ;
 
-<PRIVATE
-
 : split-decimal ( str -- neg? dollars cents )
     "." split1 [ "-" ?head swap ] dip ;
 
@@ -37,6 +31,4 @@ ERROR: not-an-integer x ;
         [ dup string>number [ nip ] [ not-an-integer ] if* ] bi@
     ] keep length 10^ / + swap [ neg ] when ;
 
-PRIVATE>
-
 SYNTAX: DECIMAL: scan-token parse-decimal suffix! ;