Another way to insert a space, which does not require deleting the trailing blank.

   ;:^:_1 <"0 'Sassa'
S a s s a

Steve

Roger Hui wrote:
A solution different from the ones mentioned so far:
   1j1 # 'Sassa'
S a s s a
If you don't want the final blank it can be easily removed:
   }: 1j1 # 'Sassa'
S a s s a

Tacitly:
   13 : '}: 1j1 # y'
[: }: 1j1 # ]

p.s. If you read Russian you may be interested in the following
Russian translation of the dictionary:
http://galaxy.fzu.cz/~metlov/dictionary/contents.htm



----- Original Message ----- From: "???????????? ????????? ????????" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, March 22, 2006 6:08 AM
Subject: [Jprogramming] Inserting spaces

Hello guys.
I have  just started learning J and got some problems with TACIT form of 
thinking...
Thus I'll be asking some silly question for first time :)

So the question is:
I have a string of chars. I need to insert space between each two characters. 
Sounds like a
simple task, but I can't figure out how to compose a corresponding verb.

Surely, I defined an explicit function solving this problem. It looks like

join =: 4 : 0 x., ' ', y.
)

now this works as join / 'Sassa'
S a s s a

It works well but it is a still imperative. And I want to learn to think in 
functionals.

I will be very joyful if you help me. Thanks a lot, and sorry if made some spam :)

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

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

Reply via email to