Hello Tom;
Note that ,&'cc' each list gives 'aacc';'bbcc';'randomdatacc'
This also works:
(<'cc'),each list NB. make sure the boxing levels match.
Tom Arneson wrote:
,&'cc' each list
Bond combines , and 'cc' into a new verb
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of unigee
Sent: Sunday, July 20, 2008 13:20
To: [email protected]
Subject: [Jprogramming] append string to a list of strings?
hi, im learning myself J and come into a slight problem I don't know how to
solve
im trying to append some characters to a list of strings
list=. 'aa' ; 'bbb' ; 'randomdata'
now i want to add 'cc' to each item in list, so the result would be
'ccaa' 'ccbbb' 'ccrandomdata'
I thought this would be it
'cc' , each list
but that produces an length error
can someone please point me in the right direction?
--
------------------------------------------------------------------------
|\/| Randy A MacDonald | APL: If you can say it, it's done.. (ram)
|/\| ramacd <at> nbnet.nb.ca |
|\ | | The only real problem with APL is that
BSc(Math) UNBF'83 | it is "still ahead of its time."
Sapere Aude | - Morten Kromberg
Natural Born APL'er |
-----------------------------------------------------(INTP)----{ gnat }-
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm