Mark D. Niemiec
> Just because things look the same, doesn't mean they are.

But you could write a test that checks for "looks the same"

test=: -:&(((#~[:+./\1&~:)@$ ($,) ])@:":)

Or, use test"0 if you prefer.

Or, for more pedestrian uses, the ,. monad might be sufficient
to coerce shapes.

Of course, "looks the same" doesn't mean "behaves the same"...
   one=: 1 1 1 1 1 2$'1 '
   one
1
   1 + 1 2 3
2 3 4
   one + 1 2 3
domain error

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

Reply via email to