That's the nicest for this usage. joinstring (in the strings script
j602, loaded at boot in j701) is useful for occasions when you want to
join with one or more other chars.
',' joinstring z
alpha,bravo,charlie
')(' joinstring z
alpha)(bravo)(charlie
On Fri, Sep 7, 2012 at 4:44 AM, Aai <[email protected]> wrote:
>
> ;: inv z
> alpha bravo charlie
>
>
> On 06-09-12 18:38, Ian Clark wrote:
>>
>> Kindergarten class...
>>
>> I have a list of boxed literals...
>> z=: 'alpha' ; 'bravo' ; 'charlie'
>>
>> I want to flatten it to a literal, but with spaces between. (Variant:
>> --with LF's).
>>
>> Raze (;) does indeed flatten the list...
>> ;z
>> alphabravocharlie
>>
>> There's got to be a really neat extended Raze which includes
>> separators. But the fastest I've been able to come up with is:
>>
>> b2o=: }.@((<' ') ;@,. ])
>> b2o z
>> alpha bravo charlie
>>
>> Any advances?
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> --
> Met vriendelijke groet,
> @@i = Arie Groeneveld
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm