found it... seems the return values for 5!:1 are
character type and not numbers :(
{. will transform shape 1 into shape 0

(".({.,>{.(t=.>5!:1<'a'))) = 0 2 3 4 7

this runs into different problems when the result of
5!:1 is a verb.

--- p j <[EMAIL PROTECTED]> wrote:

> Stuck again, sorry.
>    a=: 3 4
> 
>    (;{.(t=.>5!:1<'a'))
> 0
>    t
> &#9484;&#9472;&#9516;&#9472;&#9472;&#9472;&#9488;
> &#9474;0&#9474;3 4&#9474;
> &#9492;&#9472;&#9524;&#9472;&#9472;&#9472;&#9496;
>    $ (,,,.;{.(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
> 


__________________________________________________
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

Reply via email to