Hey Pascal,
You may be looking for symmetry where there is none. The following shows these
monadic verbs are acting as the dictionary suggests.
$ > 2; < 2 4 $ i.8
2 2 4
> 2; < 2 4 $ i.8
2 0 0 0
0 0 0 0
0 1 2 3
4 5 6 7
>@}. 2; < 2 4 $ i.8 NB. }. drops first item of argument, resulting in a
one item list
0 1 2 3
4 5 6 7
$ >@}. 2; < 2 4 $ i.8
1 2 4
>@{: 2; < 2 4 $ i.8 NB. {: returns last item of argument
0 1 2 3
4 5 6 7
$ >@{: 2; < 2 4 $ i.8
2 4
Hope this helps,
Cheers, bob
On 2013-10-01, at 9:17 PM, Pascal Jasmin wrote:
> I am taking the shape after I have opened the item. I'd expect it (the
> insides) to be the same whether I got the item from }. or {:
>
>
>
> ----- Original Message -----
> From: Roger Hui <[email protected]>
> To: Programming forum <[email protected]>
> Cc:
> Sent: Wednesday, October 2, 2013 12:00:27 AM
> Subject: Re: [Jprogramming] strange difference between }. and {:
>
> Not so strange. }. and {: are not equivalent, even on 2-element lists.
>
>
> On Tue, Oct 1, 2013 at 8:56 PM, Pascal Jasmin <[email protected]>wrote:
>
>> $ >@}. 2; < 2 4 $ i.8
>> 1 2 4
>> $ >@{: 2; < 2 4 $ i.8
>> 2 4
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm