1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors arrays assocs kernel math math.intervals
4 namespaces sequences money math.order usa-cities
5 taxes.usa taxes.usa.w4 ;
9 : mn-single ( -- triples )
12 { 1950 23750 DECIMAL: .0535 }
13 { 23750 73540 DECIMAL: .0705 }
14 { 73540 1/0. DECIMAL: .0785 }
17 : mn-married ( -- triples )
20 { 7400 39260 DECIMAL: .0535 }
21 { 39260 133980 DECIMAL: .0705 }
22 { 133980 1/0. DECIMAL: .0785 }
26 MN mn-single mn-married <tax-table> ;
28 M: MN adjust-allowances* ( salary w4 collector entity -- newsalary )
29 2drop calculate-w4-allowances - ;
31 M: MN withholding* ( salary w4 collector entity -- x )
33 [ adjust-allowances ] 2keep marriage-table tax ;