Hahahaha.
But if your using English ... J blends itself well. I usually use/load the
'primitives' file and use the "English" equivalent instead of the symbols.
For example:
[data=. 2 # i. 5 5
0 1 2 3 4
0 1 2 3 4
5 6 7 8 9
5 6 7 8 9
10 11 12 13 14
10 11 12 13 14
15 16 17 18 19
15 16 17 18 19
20 21 22 23 24
20 21 22 23 24
[idx=. {."1 data
0 0 5 5 10 10 15 15 20 20
(~.idx),. idx +/ /. }. "1 data
0 2 4 6 8
5 12 14 16 18
10 22 24 26 28
15 32 34 36 38
20 42 44 46 48
The script above can be written this way:
load 'primitives'
[data=. 2 copy integers 5 5
0 1 2 3 4
0 1 2 3 4
5 6 7 8 9
5 6 7 8 9
10 11 12 13 14
10 11 12 13 14
15 16 17 18 19
15 16 17 18 19
20 21 22 23 24
20 21 22 23 24
[idx=. take rank 1 data
0 0 5 5 10 10 15 15 20 20
(nub idx) stitch idx plus insert key drop rank 1 data
0 2 4 6 8
5 12 14 16 18
10 22 24 26 28
15 32 34 36 38
20 42 44 46 48
Actually, since I've created my own library, my script for the last code would
read like this:
(unique idx) aside data consolidateby 1
0 2 4 6 8
5 12 14 16 18
10 22 24 26 28
15 32 34 36 38
20 42 44 46 48
Your actually limited by your imagination. ;)
r/Alex
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of DIETER ENSSLEN
Sent: Monday, August 10, 2009 3:14 AM
To: General forum
Subject: Re: [Jgeneral] Syntax of J; was Re^n: Array Based Languages
and i was thinking i was learning math / computing, now i have to go back to
English grammar
thanks
dick
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm