As has been pointed out, (x y) is not the same as (5 2). (x y) is two
tokens, where (5 2) is only one token. Therefore, to put the x and y
together you need a comma as (x,y). Once you fix that the 13 will convert to
tacit.

Your interest in making a tacit expression has another problem though. Tacit
definitions do as many calculations at definition time as can be done, so
that doesn't have to be done every time it is executed. The (52?52) is
evaluated at definition, where in the explicit form, it is evaluated each
time xx is run. The tacit definition will give you the same shuffle every
time where the explicit definition will give you a new shuffle.

On Mon, Mar 1, 2010 at 5:24 AM, Alex Gian <[email protected]> wrote:

> As a newb I'd appreciate a word or two of explanation here.
> I mean, I can see that bracketing the arguments probably has something
> to do with the rank of $ - I've had this kind of issue before - but why
> do we have to use , (Ravel) between them?
>
> I should also say that despite the thread of the title, what we have
> here is more like 'explicit' rather than 'tacit' confusion...
>
> I was unable to write the above even "mock-tacitly", i.e. using [ and ]
> xx =: (], [) $ ( 52 ? 52 )  NB. Don't work - syntax error
>
> Further, our old friend "13 : '....' " doesn't seem to help either.  In
> fact, its suggestion of
>   4 : 'x y $ (52?52)'
> is downright wrong.
>
>
>
> On Mon, 2010-03-01 at 11:49 +0100, R.E. Boss wrote:
> > change  :=  in  =:
> >
> >    xx =: 3 : 'y 2 $ ( 52 ? 52 )'
> >    xx 5
> > |syntax error: xx
> > |       y 2$(52?52)
> >
> > then
> >
> >    xx =: 3 : '(y, 2) $ ( 52 ? 52 )'
> >
> >    xx 5
> > 30 19
> > 10 43
> >  6 13
> > 29 27
> > 23  7
> >
> >
> > R.E. Boss
> >
> >
> > > -----Oorspronkelijk bericht-----
> > > Van: [email protected] [mailto:programming-
> > > [email protected]] Namens Elmer Fittery
> > > Verzonden: maandag 1 maart 2010 11:36
> > > Aan: [email protected]
> > > Onderwerp: [Jprogramming] tacit confusion
> > >
> > >
> > >     5 2 $ (52 ? 52)
> > > 37 17
> > > 29 26
> > > 18 41
> > > 38 33
> > > 31 28
> > >
> > > xx := 3 : 'y 2 $ ( 52 ? 52 )'
> > >    xx 5
> > > |domain error: xx
> > > |       xx 5
> > >
> > > how do I get the 'y' value?
> > > how would I get the 'x' value?
> > >
> > > thanks
> > >
> > >
> > >
> > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to