SHARE
TWEET

Untitled

a guest Sep 23rd, 2011 417 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let calcTax =
  2.     let rec tax amt = function
  3.     | (limit,rate)::rest when amt > limit ->
  4.         rate * (amt - limit) + tax limit rest
  5.     | _ :: rest -> tax amt rest
  6.     | [] -> 0.0m
  7.  
  8.     let rates =
  9.         [40230m, 0.45m;
  10.          21240m, 0.33m;
  11.          14070m, 0.30m;
  12.           8660m, 0.23m;
  13.           5070m, 0.14m;
  14.              0m, 0.10m]
  15.  
  16.     fun amt -> tax amt rates
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top