Hello,

Could you please explain the followin thing:
   [ns=:?10#1500
1225 1362 1263 1376 1445 383 1260 397 175 1188
NB. I try to find 3digit numbers with unique digits.
I wrote this:
ns#~((((3&=@#) *. (*./@~:))@":)"0) ns
I think here are too many brackets, so I removed some
ns#~(((3&=@#*.*./@~:)@":)"0) ns

Q1: how J understand how to split (xyz) here? How can I parse it in mind?
Q2: Why I should write 3&=, but not *.&/ ?

After that I did:
(((3=#*.*./@~:)@":)"0) ns

Q3: It absolutely not clear for me, how can I write 3=# (explicit)
instead of 3&=@# (tacit)?

It is the main problem in J for me, for example I write expression:
   [ns2=:i.10
0 1 2 3 4 5 6 7 8 9
ns2#~-.2|ns2 NB. it looks good, no problem.

But the problem, if I would like convert it into the function, I
should absolutely rewrite it:

ns2#~(-.@(2&|))ns2 NB. additional Q: why 2&| in brakets?

@, which is not used in normal expression, that is strange for me that
expression and function is not the same, K looks more habitually at
this point:
expression: ns2:!10; ns2@~ns2!2
function: ns2@{~x!2} ns2 / exactly the same like expression.

What is why it is not clear for me why J expression in explicit style
by default, but function in tacit.

Thank you and sorry if described problem is not very clear.
-- 
Regards,
  Alexander.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to