Roger Hui wrote:
> 
> I suspect v"0 would serve.  If it does not,
> I'd like to see what such a v is.
> 
> 
> 
> ----- Original Message -----
> From: Justin Paston-Cooper <[email protected]>
> Date: Friday, October 1, 2010 9:12
> Subject: [Jprogramming] Another Abbreviation
> To: Programming forum <[email protected]>
> 
>> Hello,
>> 
>> Is there an abbreviation or better way of doing <<($ $ 
>> v@,)>>, where v
>> is a monad?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
> 
I think this much is clear: If v returns scalar, then (monadic) v"0 is 
equivalent to ($ $ v@,) and if result of v has rank > 0, then it is not.

For instance:

   a =: 1 : '$ $ u@,'
   v =: 5&,

   v"0 i. 2 2
5 0
5 1

5 2
5 3

   v a i. 2 2
5 0
1 2

-- 
View this message in context: 
http://old.nabble.com/Another-Abbreviation-tp29859371s24193p29879331.html
Sent from the J Programming mailing list archive at Nabble.com.

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

Reply via email to