($~ _1+x+#)

nice one!




On 18/01/2018 16:08, Raul Miller wrote:
Ah, yes, I missed the bit about wrapping. I was in a hurry to get out
the door and glossed over that part.

Still, that's simple to add:

words=: ;: NB. might change this because punctuation handling

pc=: 4 :0
   w=. x <@(;:inv)\ ($~ _1+x+#) words y
   n=. #/.~ w
   o=. \: n
   (<"0 o{n),:o{~.w
)

Not quite the same implementation as your xwrap, but I think I prefer
using reshape for something like this.

Thanks,



---
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