Alexander Cherednichenko wrote:
>          join =: 4 : 0 
>       x., ' ', y.
>       )
...
> It works well but it is a still imperative. And I want to learn to 
> think in functionals.

J has a number of facilities to help you with this.

For example:

   join=: 13 : 0
x., ' ', y.
)
   join/'abcde'
a b c d e
   join
[ , ' '"_ , ]

If you make sure to take the time to understand each of the 
symbols used, and each of the grammatical rules involved,
you'll pick things up pretty quickly.

(Note that the actual display for a verb will depend on how you
have J configured.  If you're using the gui instance of J, visit
Edit->Configure and select linear display form to get the above
display.

Also, I highly recommend trying a j6 beta.  The 13 : translator
is far more capable in j6, and tacit expressions can be more
concise in j6.  The effect is relatively minor in this case,
but still noticable.

   join=: 13 : 0
x, ' ', y
)
   join/'abcde'
a b c d e
   join
[ , ' ' , ]

Good luck,

-- 
Raul
   

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

Reply via email to