Terrence Brannon wrote:
but (0 $ 2) produces an empty list. So using our understanding of what x $ y
does (the shape of this result is x concatenated with the shape of an item
of y .) , we can see that we cannot concatenate x in this case because it is
not a shape but an empty list.

left rank of $ is 1 so that the scalar 0 in (0 $ 2) will be extended into ,0 (rank-1) by J before execution.

You can find the rank of verb from DoJ at the top of page for any primitive, eg
   Shape Of     $  _ 1 _        Shape
here rank of monad $ is _ (unbound), dyad $ has left and right rank of 1 and _ respectively.

and for any verb whether primitive or user-defined, its rank can be found by b. 0
eg,
   $ b. 0
_ 1 _
   + b. 0
0 0 0
   /: b. 0
_ _ _



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

Reply via email to