Need adverb 
Author Message
 Need adverb

Hi,

I want to build an adverb, "doit", in
J206 will works something like this :

   3 * doit 5
13
   3 + doit 5
 8

That is, doit takes the verb to its
left and when used applies the dyadic
of the input verb.

The exact syntax is not important...

   3 *&doit 5
   3 doit * 5
   3 doit&f 5

would be fine.

Thanks,

e-



Sun, 08 Mar 1998 03:00:00 GMT  
 Need adverb

Quote:

>Hi,

>I want to build an adverb, "doit", in
>J206 will works something like this :

>   3 * doit 5
>13
>   3 + doit 5
> 8

>That is, doit takes the verb to its
>left and when used applies the dyadic
>of the input verb.

Sounds like you want  doit  to do nothing, i.e. to cause
the interpreter to behave as though it were a space.

   doit =. 11 : 'x.'
   doit
+--+-+
|[.|+|
+--+-+
   3 + doit 5
8
   3 * doit 5
15

Henry Rich



Sun, 08 Mar 1998 03:00:00 GMT  
 Need adverb

Quote:
Emmett Mclean writes:
>I want to build an adverb, "doit", in
>J206 will works something like this :

>   3 * doit 5
>13
>   3 + doit 5
> 8

>That is, doit takes the verb to its
>left and when used applies the dyadic
>of the input verb.

Try the identity adverb:

   doit=: ]:

   3 * doit 5
15
   3 + doit 5
8



Mon, 09 Mar 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need help with adverb

2. J adverb question

3. J ammend adverb }

4. Defining adverbs tacitly

5. adverb definition via : in J 3.2

6. User-defined adverbs?

7. Trains of conjunctions and/or adverbs

8. Prefix adverb in J

9. tacit adverb problem [J]

10. A handy explicit adverb in J

11. Can I design a bivalent adverb without using : ?

12. Anybody got an easy way to design adverbs?

 

 
Powered by phpBB® Forum Software