What would be a more general way to put it, instead of
many, A
reduce or scan this
would be of the form:
many
scan/reduce to form a fork
fork apply A
I inherently dislike
catenate A to many
scan or reduce
Cheers.
On 5/23/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
Roy A. Crabtree <roy.crabtree <at> gmail.com> writes:
>
> Instead of
>
> (((A pp 2) pp 3) pp4)...
>
> what if you stated it as
>
> 4 pp 3 pp 2 pp A
>
> iii) scan apply it to A.
I looked on the wiki for a scan tutorial and found this:
http://www.jsoftware.com/jwiki/OlegKobchenko/Ways_to_Scan?highlight=%28scan%29
but then I immediately hit a problem.
c=. '(' , [ , ')' ,~ ]
'a' c 'b' c 'c'
(a(bc))
That was all well and good, but I wanted a more "pictorial" way to form
the
string, so I tried to move the "]" inside the parenthesis, since that is
what c
does... 'b' c 'c' creates (bc) and so I wanted the verb to look the same
way too.
So I tried:
c=. '(' , [ , ] , ')'
but I got a syntax error when I tried to run it.
At first I thought this was because I was supplying "," with a verb
argument and
it only takes two nouns... i.e., ')' , ] works because "]" gets the right
arg
and returns a noun so that , has two nouns to work on.
But if that is the case then after ')' ,~ ] we have [ , 'c)' which means
that
"," still has to work on a verb argument as opposed to a noun argument.
So why is it that [ , 'c)' will work but my attempt to have
] , ')' work will not?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
--
Roy A. Crabtree
UNC '76 gaa.lifer#
(For TN contact, email me to set up a confirmed date/time)
[When you hear/read/see/feel what a yehudi plays/writes/sculpts/holds]
[(n)either violinist {Menuhin} (n)or writer {"The Yehudi Principle"} (n)or
molder (n)or older]
[you must strive/think/look/sense all of it, or you will miss the meanings
of it all]
[EMAIL PROTECTED] Forwards only to:
[EMAIL PROTECTED] CC: auto to:
[EMAIL PROTECTED] Be short < 160 chars cuts off; currently
offline
[EMAIL PROTECTED] CC: auto to ^
http://www.authorsden.com/royacrabtree
http://skyscraper.fortunecity.com/activex/720/resume/full.doc
--
(c) RAC/IP, ARE,PRO,PAST
(Copyright) Roy Andrew Crabtree/In Perpetuity
All Rights/Reserved Explicitly
Public Reuse Only
Profits Always Safe Traded
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm