Stuck again, sorry.
a=: 3 4
(;{.(t=.>5!:1<'a'))
0
t
┌─┬───┐
│0│3 4│
└─┴───┘
$ (,,,.;{.(t=.>5!:1<'a'))
1
(Can't seem to transform result of first expression
into $ of 0 (blank result).. so that an expression
like the following returns a 1 where it matches:
(;{.(t=.>5!:1<'a')) (="0 1) 0 2 3 4 7
0 0 0 0 0
--- "Miller, Raul D" <[EMAIL PROTECTED]> wrote:
> 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
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm