f=:-@]/
g=:-@(]/)
f 1 2 3
3
g 1 2 3
_3
Start by using an expression that gives the same result without @ as one
less conjunction:
([:-])/1 2 3
3
-]/1 2 3
_3
Then you have built the result from right to left. Then the rightmost
parentheses will never be necessary:
h=:([:-])/
h 1 2 3
3
i=:[:-]/
i 1 2 3
_3
This only one style. It may or may not work for you.
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of km
Sent: Sunday, February 03, 2013 8:58 PM
To: [email protected]
Subject: Re: [Jprogramming] Writing J
Below -@|./ means (-@|.)/ . This "chain" has a total of two adverbs or
conjunctions. I personally am uncomfortable with "chains" that have more
than three.
-@|./ 1 2 3
3
-@(|./) 1 2 3
_3
What is in your personal book about writing J?
Kip Murray
Sent from my iPad
On Feb 3, 2013, at 4:43 PM, km <[email protected]> wrote:
> Strunk and White begin "The Elements of Style" with "Elementary Rules of
Usage", for example using
>
> It's a wise dog that scratches its own fleas
>
> to illustrate the difference between it's and its.
>
>
> In J we could use
>
> +: - -: 12
> _12
> (+: - -:) 12
> 18
>
> to illustrate the difference between f g h y and (f g h) y .
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm