--- neville holmes <[EMAIL PROTECTED]> wrote:
> 
> You can also imply the use of operands when defining
> operators (adverbs and conjunctions) tacitly, but this gets
> very awkward.  Tragically, you can't use [. and ]. to specify
> operand use the way [ and ] specify argument use.  Thus
> a conjunction like [.&{. ]. [.&{: cannot be clearly defined.
> 
This was an early-morning email, and I realized as I was
showering that my example should have been
  {.[.}.
so that the adverb
a =. {.[.}.
would allow f a x to apply f between the head of x and the
behead of x.  Similarly, x f a y would use x {. y and x }. y as
arguments for f.

Other examples:

b =. ] ,: [.   NB. adverb

then f b x would stack x over f x and x f b y would stack y
over x f y.

c =. [EMAIL PROTECTED] [. {:@[ ]. ]   NB. conjunction

then 3 7 f c g y would effect 3 f 7 g y (and I intend this as
a top of the head example of defining a conjunction c which
could be used systematically for various kinds of series).

There are ways of defining such adverbs and conjunctions
without [. and ]. I suppose, but surely [. and ]. would make
such constructs much easier to produce and understand.

(The above are from memory; I haven't coded any J for
months now, more's the pity.) 


Neville Holmes, P.O.Box 404, Mowbray 7248, Tasmania
Normal e-mail: [EMAIL PROTECTED]


      
____________________________________________________________________________________
Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage.
http://au.docs.yahoo.com/mail/unlimitedstorage.html

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to