On Sat, Jan 16, 2010 at 12:38 PM, Dan Bron <[email protected]> wrote:
> Also, I just realized today that, at least for sorting & grading, empty is
> considered its own "type" (on par with numeric, literal, symbolic, boxed,
> etc). In the Vocab entry for /: [1] we read:
>
> The types: numeric or empty, symbol, literal (1 byte or 2 byte
> characters), and boxed, are so ordered
...
> [1] http://www.jsoftware.com/help/dictionary/d422.htm
I have been wondering if J should perhaps have nouns
with empty type.
If it did, and if a: was a box containing an array of this
type, then
fill=: {.a:
Then:
#$fill
0
$":fill
0
fill+0
0
'*',fill,'*"
* *
3(2)}5 5$fill
0 0 0 0 0
0 0 0 0 0
3 3 3 3 3
0 0 0 0 0
0 0 0 0 0
'#'(2)}5 5$fill
#####
And, so on...
An array of this empty type would not have a
shape but would not have any data.
But if a: were redefined, that might break some
existing code?
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm