[REBOL] Re: Fun with literal blocks!
From: jeff:rebol at: 2-Nov-2000 11:27
Howdy, Joel:
> make-sales-tax: func [
> srate [decimal!] lrate [decimal!] llim [money!]
> ][
> func [amt [money!]] [
> (srate * amt) + (lrate * min amt llim)
> ]
> ]
or.. if you're feeling nutty:
make-sales-tax: func [
srate [decimal!] lrate [decimal!] llim [money!]
][
func [amt [money!]] compose [
(to-paren compose [(srate) * amt]) +
(to-paren compose [(lrate) * min amt (llim)])
]
]
Gotham and smallville get paid correctly and the GC stays
happy.
-jeff