(^@j. = cos + 0j1 * sin) 1 2 3 0.1j_0.2
1 1 1 1
   
   (^j. = cos + 0j1 * sin) 1 2 3 0.1j_0.2
1 1 1 1

   ^j.
^ j.

This made a connection with trigonometry relationships.  I now have a little
glimmer about  t. but I must admit it is still fuzzy.
   
   ^t.
%@!

Linda


-----Original Message-----
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Roger Hui
Sent: Tuesday, November 06, 2012 11:54 AM
To: Programming forum
Subject: Re: [Jprogramming] Arc consistency in J

'noun verb verb' is a fork and is interpreted as 'noun"_ verb verb' (noun"_
is a constant verb whose result is noun).  http://keiapl.org/anec/#nvv

'verb verb noun' can not be made into a fork because 'verb noun' already has
an interpretation (*viz*., apply verb to noun).


On Tue, Nov 6, 2012 at 8:47 AM, Michal D. <michal.dobrog...@gmail.com>wrote:

> > Change from a Noun to a verb, view its tacit version and apply it to
> data:
> >
> >     dd=: 13 :'(y%2) > (?]) x$y'
> >
> >     dd
> > (2 %~ ]) > [: (? ]) $
> >
>
> That is quite cool.  I'm surprised that you can automatically get the 
> tacit definition.  Does this work for any explicitly defined verb?
>
> I'm also surprised at the way %~ came out.  Do left hand arguments not 
> require a & to bind the argument?  It is strange to me that (1) works 
> but
> (2) does not.  It seems to me that (3) is the logical way to phrase 
> either of them (ie. a fork with a constant right / left side).  To 
> reiterate, why does (1) work?
>
> (1)    (2 %~ ]) > [: (? ]) $
> (2)    (] % 2) > [: (? ]) $
> (3a)   (2: %~ ]) > [: (? ]) $
> (3b)   (] %~ 2:) > [: (? ]) $
> (4a)   (%&2 ]) > [: (? ]) $      NB. incorrect (hook caught me out again)!
> (4b)   ([: %&2 ]) > [: (? ]) $   NB. correct
>
> Cheers,
>
> Mike
> ----------------------------------------------------------------------
> 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