]> gitweb.factorcode.org Git - factor.git/blob - extra/taxes/usa/fica/fica.factor
change ERROR: words from throw-foo back to foo.
[factor.git] / extra / taxes / usa / fica / fica.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors math math.order money kernel assocs ;
4 IN: taxes.usa.fica
5
6 : fica-tax-rate ( -- x ) DECIMAL: .062 ; inline
7
8 ERROR: fica-base-unknown ;
9
10 : fica-base-rate ( year -- x )
11     H{
12         { 2009 106800 }
13         { 2008 102000 }
14         { 2007  97500 }
15     } at [ fica-base-unknown ] unless* ;
16
17 : fica-tax ( salary w4 -- x )
18     year>> fica-base-rate min fica-tax-rate * ;