Well I thought I had a prettier version.
numeric1=:(0 -: {:)@:(0 # ,)
numeric1 'a'
0
numeric1 4 5 $ 'a'
0
numeric1 i. 4 5
1
numeric1 x: i. 4 5
1
But then Raul's example of sparse arrays failed
numeric1 4+0 $.i.3
0
The first part seemed to work as expected
(0#,) 4+0 $.i.3
$(0#,) 4+0 $.i.3
0
So I assigned it to a variable which looked empty as expected...
t=.(0#,) 4+0 $.i.3
t
$t
0
but then this!
{:t
4
Anyone know how an empty list can have a last item?
Confused, bob
> On Nov 9, 2017, at 10:15 AM, Raul Miller <[email protected]> wrote:
>
> isnumeric 4+0 $.i.3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm