{:: doesn't conform to its description.  For one thing,
it acts differently if x is unboxed; for another, it doesn't
open a scalar.

   0 {:: <123
|length error

Also, it behaves differently if the last selection produces
a list:

   (<<0 1) {:: 'a';'b'
+-+-+
|a|b|
+-+-+
   (<<0 1) fetch 'a';'b'
ab

Workaround for your problem:

   ('';_1) {::   <i.3
2



Henry Rich

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Raul Miller
> Sent: Tuesday, May 22, 2007 1:24 PM
> To: General forum
> Subject: [Jgeneral] {:: implementation conflicts with dictionary
> 
> Reference: http://www.jsoftware.com/help/dictionary/d523.htm
> 
>    fetch=: >@({&>/)@(<"0@|[EMAIL PROTECTED] , <@]) " 1 _
>    0 _1 fetch <i.3
> 2
>    0 _1 {::   <i.3
> |length error
> |   0 _1    {::<i.3
> 
> How does one use {:: to get the last item in a box?
> 
> -- 
> Raul
> ----------------------------------------------------------------------
> For information about J forums see 
> http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to