I wrote:
> We can reduce the category function to its absolute essentials:
>
> category =: 1 + LVLS I. [
If you're really getting into the groove of this reduction thing now, maybe
something else, at the back of your mind, is still niggling you about this
verb.
What could it be? The verb is already pretty bare-bones. What's left to
pare? Well, maybe it's not a reduction we're after, but ...
> Here, we've successfully removed all the
> undocumented magic numbers
it's just that we've been removing all these numbers, yet there's still one
left.
Isn't that 1, in a way, a magic number? Isn't just our implicit way of
saying that humans prefer to think in origin-1? After all, no one says a
"category zero" cyclist (or hurricane).
Well, a computer would. In J programs, it is completely natural to think in
origin zero. After all, categories are rankings (relationships), and the
difference between a category-zero cyclist and a category-one cyclist is
still one skill level. That niggle in the back of your head is just J making
(quiet) suggestions again.
So, you want to see what your category function really is?
category =: LVLS I. [
There it is. Distilled; irreducible; pure. That's how you're really ranking
cyclists.
And in fact, in a J program, you'd likely keep it this way, because
everything in J is built around origin-0, and maintaining the standard makes
everything go smoother. Not that you'd experience the thought that way, of
course; you'd just feel that zero was the "natural" choice, and adding the
one would feel "artificial". The thought probably wouldn't even occur to you
until you came to the end of the program, where you're formatting the
results for human consumption.
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm