Yes,  you're right in a way about @: ,  but I'd skipped defining a verb
to do the job.

What I had in mind,  but didn't explicitly show,  was something like
     remz =: ($$rplc & (' 0';' ')) @ ":    NB. @  also works ok!
so allowing
    remz a
etc.

And yes,  the $$ restores the shape of the ravelled output of rplc.

There are lots of other ways too,  as shown by the correspondence
you've generated!

Mike

On 28/09/2017 12:42, Rudolf Sykora wrote:
On 27 September 2017 at 19:13, 'Mike Day' via Programming
<[email protected]> wrote:
    ($$rplc & (' 0';'  ')) @: ": a
Yes. (I guess the @: is unnecessary here, right?)

I actually had tried something similar first:

(' 0';' ') stringreplace ":r

which, however, yielded

1 2 3 4 5 6 7 8 9 10 11 12 13 14 1516 17 18 19 20 21 2223 24 25 26 27 28 2930 31

I didn't (and still don't) understand why I got a single line, and
decided to ask for help then...
I see (if I understand) you put the shape back in with $$...
so in my case it would be
($$ (' 0';' ')& stringreplace) ":r

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


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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

Reply via email to