foo=:4 :0
  assert. 4 = (3!:0) x         NB. x is integer
  assert. 2 = # x              NB. x has 2 items
  assert. 2 = #$ x     NB. x has rank 2
  assert. (# y) = +/{: x
  assert. 0 < <./{. x          NB. {.x is positive
  'd l'=.x
  d <@]^:[&> (; l {.&.> 1) <;.1 y
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to