I think I'm cheating because I'm not using $:

what I meant by refactoring 1 : 'u@{. + u@{:'

   

  *: ((+&)/(@({. , {:)) 3 4 5 6
45

 



----- Original Message -----
From: Jose Mario Quintana <[email protected]>
To: Programming forum <[email protected]>
Sent: Wednesday, April 13, 2016 7:33 PM
Subject: Re: [Jprogramming] Adverbial Tacit Jym

Pascal, you are right about the example.  Allow me to be more specific by
labeling the cases:

Exercise 1.1.0

-  1.1.0.0  Provide an example of the method when there are multiple
instances of u

-  1.1.0.1  Provide an example of the method when u is monadic and the
product  (u a) is dyadic

-  1.1.0.2  Provide an example of the method when u is monadic and the
product is also monadic

-  1.1.0.3  Provide an example of the method when u is dyadic and the
product is dyadic

The generic form   u@{. + u@{:  corresponds to the case 1.1.0.2 when there
are two instances of u.  The challenge is to exhibit an adverb, say,
a1x1x0x2 such that, for example,

   *: a1x1x0x2 3 4 5 6
45

by means of the method (i.e., using the same kind of trick).


A   m i n o r   h i n t   f o l l o w s . . .
A   m i n o r   h i n t   f o l l o w s . .
  A   m i n o r   h i n t   f o l l o w s .
   A   m i n o r   h i n t   f o l l o w s
    A   m i n o r   h i n t   f o l l o w
     A   m i n o r   h i n t   f o l l o
      A   m i n o r   h i n t   f o l l
       A   m i n o r   h i n t   f o l
        A   m i n o r   h i n t   f o
         A   m i n o r   h i n t   f
          A   m i n o r   h i n t
           A   m i n o r   h i n t
            A   m i n o r   h i n
             A   m i n o r   h i
              A   m i n o r   h
               A   m i n o r
                A   m i n o r
                 A   m i n o
                  A   m i n
                   A   m i
                    A   m
                     A
                      A


   #(5!:5)<'a1x1x0x1'  NB. The tally of the lr of one solution...
28

Incidentally, when  u  is a large verb and there are multiple instances of
it, this kind of solutions produce thrifty verbs.  The caveat, because
their reliance on $:, is that cannot be embedded in within a fixed tacit
verb...  Unless, they are wearing a suit of armor!


On Tue, Apr 12, 2016 at 2:32 PM, 'Pascal Jasmin' via Programming <
[email protected]> wrote:

>
>
> > Provide an example of the method when there are multiple instances of u
>
> Not sure how here, except where 1 : 'u@{. + u@{:' could be refactored
> into a single u, and then use $:
>
> Very interested in understanding other 3 examples.
>
>
> ----- Original Message -----
> From: Jose Mario Quintana <[email protected]>
> To: Programming forum <[email protected]>
> Sent: Tuesday, April 12, 2016 10:17 AM
> Subject: Re: [Jprogramming] Adverbial Tacit Jym
>
> Anyone that wants to know the answer can find the original one [0] written
> almost 10 years ago!
>
> Sorry Dan, here there are more minor hints ;)
>
> The importance of this solution is that illustrates a fairly general and
> straightforward method for writing of a very common form: u a where u is a
> verb and its product  (u a)  is also a verb.
>
> This a bonus exercise:
>
> Exercise 1.1.0
>
> -  Provide an example of the method when there are multiple instances of u
>
> -  Provide an example of the method when u is monadic and the product  (u
> a) is dyadic
>
> -  Provide an example of the method when u is monadic and the product is
> also monadic
>
> -  Provide an example of the method when u is dyadic and the product is
> dyadic
>
>
>
> [0] [Jprogramming] Tacit adverb definitions?
>    http://www.jsoftware.com/pipermail/programming/2006-July/002627.html
>
> On Tue, Apr 12, 2016 at 8:50 AM, Dan Bron <[email protected]> wrote:
>
> > Pascal wrote:
> > > for clarity, the answer is,
> >
> > No hints, please! Anyone who wants to know the answer can just scroll
> down
> > in Raul’s original message.
> >
> > -Dan
> > ----------------------------------------------------------------------
> > 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to