]> gitweb.factorcode.org Git - factor.git/commitdiff
remove >r r>
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 14 Dec 2008 06:48:06 +0000 (00:48 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 14 Dec 2008 06:48:06 +0000 (00:48 -0600)
extra/bank/bank.factor

index a409c9781546b24bf1ea43d0ffc59e54d334f9f1..0f8b5581dfe582ff2d413527f2bd29a0b407e89d 100644 (file)
@@ -20,7 +20,7 @@ C: <transaction> transaction
 : balance>> ( account -- balance ) transactions>> total ;
 
 : open-account ( name interest-rate interest-payment-day opening-date opening-balance -- account )
-    >r [ <account> ] keep r> "Account Opened" <transaction> >>transaction ;
+    [ [ <account> ] keep ] dip "Account Opened" <transaction> >>transaction ;
 
 : daily-rate ( yearly-rate day -- daily-rate )
     days-in-year / ;
@@ -56,7 +56,7 @@ C: <transaction> transaction
 
 : each-day ( quot start end -- )
     2dup before? [
-        >r dup >r over >r swap call r> r> 1 days time+ r> each-day
+        [ dup [ over [ swap call ] dip ] dip 1 days time+ ] dip each-day
     ] [
         3drop
     ] if ;