---Alex Rufon wrote:
> Like in the example on page 111 where it defines:
>    ]a=: 1 2 3; 4 5; 6 7 8
> +-----+---+-----+
> |1 2 3|4 5|6 7 8|
> +-----+---+-----+
>
> The requirement was remove the first box and just get the
> first items of
> the succeeding boxes. The solution that was provided was:
>    }.@:({.@>) a
> 4 6
>
> Since I've don't use "Verb Sequences", my solution was:
>    }. {. "1 > a
> 4 6
>
> I tried doing the other samples and I can still come up with solutions
> without using the @ and @: symbols.
>
> So I am wondering if anybody has good examples where I would
> absolutely
> need to use verb sequencing so I can compromise with myself when to
> properly use the symbols.

I think the example was chosen to illustrate the differences between @ and @: 
rather than show situations that need to be solved using them. How about 
changing the requirement to be "remove the first box and just get the last 
items of the subsequent boxes",
   }.@:({:@>) a
5 8

I'm sure you can come up with a solution that doesn't use @, but it might help 
illustrate a situation where it comes in handy. There probably aren't any 
primitives that we couldn't work around not having 
(<http://www.jsoftware.com/jwiki/PrimitivePrimitives>). That doesn't mean they 
aren't useful.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to