3 points by akkartik 1350 days ago | link That's a great point. As I've built this, the keystone example in my mind has been the `square` function:`````` x square = x x * `````` So it's really funny that I haven't added it yet. Now added.-----
 2 points by zck 1350 days ago | link Nice!Is it that you're trying to reduce stack juggling? That's hard to understand from simple examples (that you need to have to grok the syntax). Maybe compare something like finding the hypotenuse of a right triangle given the two other sides. Without naming arguments, you'd have to do something like:`````` hypot = dup * swap dup * + sqrt `````` But with named arguments:`````` hypot x y = x x * y y * + sqrt `````` That seems a little easier to read, but even the original isn't so complicated. Is there an example that makes it more obvious why it's better? Even your `square` example is more tokens than with stack juggling (without arguments, `square = dup *` is just four tokens, compared to six with named arguments). I'd say the with-arguments one is easier to read, but I've far less familiar with stack-based postfix programming.-----
 2 points by zck 1349 days ago | link Yes, that is definitely simpler, although the formula is more esoteric. At least, for me, it triggers the "I was taught this in school and haven't used it since" filter.Maybe something like:`````` total-price cost-per-item number-of-items shipping-cost-per-item rush-cost = cost-per-item number-of-items * shipping-cost-per-item number-of-items * + rush-cost + `````` This doesn't seem super great; it could be refactored to use each thing once, but it's late and I can't think of any better example.-----