2010/3/18 Frederick W Mellem <[email protected]>:
> i.&.>("0) 4 2 3
>
> --------T---T-----┐
>
> │0 1 2 3 │0 1 │0 1 2 │
>
> L-------+---+------
>
> i.&.(>"0) 4 2 3
>
> --T-T-T-┐
>
> │0 │1 │2 │3 │
>
> +-+-+-+-+
>
> │0 │1 │ │ │
>
> +-+-+-+-+
>
> │0 │1│2 │ │
>
> L-+-+-+--
> Please explain the scalar boxing. I assume it is correct, but I don't see
> why >("0) is different from (>"0)
Those two would be exactly the same, but the difference is because
(i.&.>("0)) is the same as ((i.&.>)"0).
The scalar boxing is because the inverse of (>"0) in J is (<"0) so
(i.&.(>"0) 4 2 3) is the same as (((<"0)@:i.@:(>"0)"0) 4 2 3) in which
(<"0) boxes each atom in the output individually.
Ambrus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm