Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Fun with literal blocks!

From: lmecir:geocities at: 2-Nov-2000 21:27

Tax functions available! If anybody is missing tax functions after Joel's lucid explanation, there is a way: sales-tax: func [ stt [decimal!] loc [decimal!] cap [money!] amt [money!] ][ (stt * amt) + (loc * min amt cap) ] make-sales-tax: curry :sales-tax 3 Gotham-sales-tax: make-sales-tax 0.05 0.03 $100.00 Smallville-sales-tax: make-sales-tax 0.05 0.01 $100 Smallville-sales-tax $100.00 == $6.00 Smallville-sales-tax $200.00 == $11.00 Gotham-sales-tax $100.00 == $8.00 Gotham-sales-tax $200.00 == $13.00 The only thing you need is http://www.rebol.org/advanced/highfun.r Regards Ladislav