-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
1637 lines (1374 loc) · 97.6 KB
/
index.html
File metadata and controls
1637 lines (1374 loc) · 97.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>J Language Cheatsheet</title>
<script type="module">
document.documentElement.classList.remove('no-js');
document.documentElement.classList.add('js');
</script>
<meta name="description" content="J Language Cheatsheet largely based on NuVoc. A list of J primitives with short descriptions, links to NuVoc and some examples.">
<link rel="canonical" href="https://sergeyqz.github.io/jcheatsheet">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
<!-- <link rel="icon" href="/favicon.ico"> -->
<!-- <link rel="icon" href="/favicon.svg" type="image/svg+xml"> -->
<!-- <link rel="apple-touch-icon" href="/apple-touch-icon.png"> -->
<style>
@font-face {
font-family: 'Iosevka Fixed Web';
font-display: swap;
font-weight: 500;
font-stretch: normal;
font-style: normal;
src: url('static/woff2/iosevka-fixed-medium.woff2') format('woff2'), url('static/ttf/iosevka-fixed-medium.ttf') format('truetype');
}
/* ::selection {
background-color: cyan;
}
*/
body {
font-family: sans-serif;
}
tr.verb > td.code {
background: #ddccff;
}
tr.adverb > td.code {
background: #cceeff;
}
tr.conj > td.code {
background: #eeffcc;
}
tr.noun > td.code {
background: #ffccee;
}
tr.copula > td.code {
background: #dddddd;
}
tr.control > td.code {
background: #eeaaaa;
}
tr:hover {
outline: 1px solid #999999;
}
code, .code {
font-family: 'Iosevka Fixed Web', monospace;
font-weight: 500;
}
code {
font-size: 1.1rem;
background: #f0f0f0;
outline: #e6e6e6 solid 1px;
border-radius: 2px;
padding: 0 3px;
}
.code {
font-size: 1.2rem;
}
td {
white-space: nowrap;
}
td.code {
padding: 1px 1rem;
}
td.name {
padding: 0 .5rem;
text-align: right;
}
td.desc {
padding: 0 .5rem;
}
.rank {
/* font-size: .8rem; */
color: #00000033;
}
table {
border-collapse: collapse;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>J Language Cheatsheet</h1>
<p>The table is largely based on <a href="https://code.jsoftware.com/wiki/NuVoc">NuVoc</a> (accessed around April 2021). It contains all J primitives with short descriptions, links to NuVoc and some examples. The order and the background colors are the same as in NuVoc table. The source of the table is on <a href="https://github.com/sergeyqz/jcheatsheet">GitHub</a>.</p>
<p>Types: </p>
<ul>
<li> <code>x</code>, <code>y</code>: any noun </li>
<li> <code>a</code>, <code>b</code>: numeric scalar </li>
<li> <code>A</code>, <code>B</code>: numeric array </li>
<li> <code>C</code>, <code>D</code>: complex numeric array </li>
<li> <code>g</code>, <code>h</code>: boolean scalar </li>
<li> <code>G</code>, <code>H</code>: boolean array </li>
<li> <code>R</code>, <code>S</code>: character array </li>
<li> <code>u</code>, <code>v</code>: verb operands of modifiers </li>
<li> <code>m</code>, <code>n</code>: noun operands of modifiers </li>
</ul>
<table>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/eq">Self-Classify</a></td>
<td class="code"> = y <span class="rank">_</span> </td>
<td class="desc">compare unique items against all items; consider using <code>i.~ y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/eq#dyadic">Equal</a></td>
<td class="code"> <span class="rank">0</span> x = y <span class="rank">0</span> </td>
<td class="desc">compare corresponding atoms, <code>1</code> if equal, <code>0</code> if not; to compare two entire nouns for equality, use Match <code>-:</code></td>
</tr>
<tr class="copula">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/eqdot">Is (Local)</a></td>
<td class="code"> =. <span class="rank"></span> </td>
<td class="desc">private assignment, supports unpacking</td>
</tr>
<tr class="copula">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/eqco">Is (Global)</a></td>
<td class="code"> =: <span class="rank"></span> </td>
<td class="desc">public assignment, supports unpacking</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/lt">Box</a></td>
<td class="code"> < y <span class="rank">_</span> </td>
<td class="desc">convert to boxed form, useful for heterogeneous arrays</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/lt#dyadic">Less Than</a></td>
<td class="code"> <span class="rank">0</span> A < B <span class="rank">0</span> </td>
<td class="desc">compare corresponding atoms, wherever <code>A</code> is less than <code>B</code>, return <code>1</code>, else <code>0</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/ltdot">Floor</a></td>
<td class="code"> <. B <span class="rank">0</span> </td>
<td class="desc">largest integer less than or equal to <code>B</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/ltdot#ComplexFloor">Complex Floor</a></td>
<td class="code"> <. D <span class="rank">0</span> </td>
<td class="desc">see docs for the description</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/ltdot#dyadic">Lesser Of (Min)</a></td>
<td class="code"> <span class="rank">0</span> A <. B <span class="rank">0</span> </td>
<td class="desc">the lesser atoms of arguments</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/ltco">Decrement</a></td>
<td class="code"> <: B <span class="rank">0</span> </td>
<td class="desc">equivalent to <code>B - 1</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/ltco#dyadic">Less Or Equal</a></td>
<td class="code"> <span class="rank">0</span> A <: B <span class="rank">0</span> </td>
<td class="desc">compare corresponding atoms, wherever <code>A</code> is less than, or equal to, <code>B</code>, return <code>1</code>, else <code>0</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/gt">Open</a></td>
<td class="code"> > y <span class="rank">0</span> </td>
<td class="desc">open boxed elements</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/gt#dyadic">Larger Than</a></td>
<td class="code"> <span class="rank">0</span> A > B <span class="rank">0</span> </td>
<td class="desc">compare corresponding atoms, wherever <code>A</code> is greater than <code>B</code>, return <code>1</code>, else <code>0</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/gtdot">Ceiling</a></td>
<td class="code"> >. B <span class="rank">0</span> </td>
<td class="desc">smallest integer greater than or equal to <code>B</code>, equivalent to <code>- <. - B</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/gtdot#ComplexCeiling">Complex Ceiling</a></td>
<td class="code"> >. D <span class="rank">0</span> </td>
<td class="desc">see Complex Floor docs for the description</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/gtdot#dyadic">Larger Of (Max)</a></td>
<td class="code"> <span class="rank">0</span> A >. B <span class="rank">0</span> </td>
<td class="desc">the larger atoms of arguments</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/gtco">Increment</a></td>
<td class="code"> >: B <span class="rank">0</span> </td>
<td class="desc">equivalent to <code>B + 1</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/gtco#dyadic">Larger Or Equal</a></td>
<td class="code"> <span class="rank">0</span> A >: B <span class="rank">0</span> </td>
<td class="desc">compare corresponding atoms, wherever <code>A</code> is greater than, or equal to, <code>B</code>, return <code>1</code>, else <code>0</code></td>
</tr>
<tr class="noun">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/under">Negative Sign</a></td>
<td class="code"> _ <span class="rank"></span> </td>
<td class="desc">as the first character of a numeric constant, acts as a negative sign</td>
</tr>
<tr class="noun">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/under">Infinity</a></td>
<td class="code"> _ <span class="rank"></span> </td>
<td class="desc">standing by itself, represents the value Infinity</td>
</tr>
<tr class="noun">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/underdot">Indeterminate</a></td>
<td class="code"> _. <span class="rank"></span> </td>
<td class="desc">a placeholder broadly comparable with NaN (not a number)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/underco">Infinite</a></td>
<td class="code"> <span class="rank">_</span> [x] _: y <span class="rank">_</span> </td>
<td class="desc">Infinity (<code>_</code>), whatever the arguments happen to be</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/plus">Conjugate</a></td>
<td class="code"> + B <span class="rank">0</span> </td>
<td class="desc">complex conjugate of the number</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/plus#dyadic">Plus</a></td>
<td class="code"> <span class="rank">0</span> A + B <span class="rank">0</span> </td>
<td class="desc">add two numeric nouns</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/plusdot">Real / Imag</a></td>
<td class="code"> +. B <span class="rank">0</span> </td>
<td class="desc">decompose complex number into real and imaginary parts</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/plusdot#dyadic">GCD (Or)</a></td>
<td class="code"> <span class="rank">0</span> A +. B <span class="rank">0</span> </td>
<td class="desc">logical OR (disjunction) between Booleans, no short-circuit; Greatest Common Divisor</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/plusco">Double</a></td>
<td class="code"> +: B <span class="rank">0</span> </td>
<td class="desc">equivalent to <code>2 * B</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/plusco#dyadic">Not-Or</a></td>
<td class="code"> <span class="rank">0</span> G +: H <span class="rank">0</span> </td>
<td class="desc">logical NOR (Peirce's arrow), equivalent to <code>-. G +. H</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/star">Signum</a></td>
<td class="code"> * B <span class="rank">0</span> </td>
<td class="desc">sign of the number; a point on the unit circle for complex numbers <code>B % | B</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/star#dyadic">Times</a></td>
<td class="code"> <span class="rank">0</span> A * B <span class="rank">0</span> </td>
<td class="desc">product of two numeric nouns</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/stardot">Length / Angle</a></td>
<td class="code"> *. B <span class="rank">0</span> </td>
<td class="desc">convert a complex number to polar coordinates</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/stardot#dyadic">LCM (And)</a></td>
<td class="code"> <span class="rank">0</span> A *. B <span class="rank">0</span> </td>
<td class="desc">logical AND; Least Common Multiple in general</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/starco">Square</a></td>
<td class="code"> *: B <span class="rank">0</span> </td>
<td class="desc">square of numeric noun</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/starco#dyadic">Not-And</a></td>
<td class="code"> <span class="rank">0</span> G *: H <span class="rank">0</span> </td>
<td class="desc">logical NAND, equivalent to <code>-. G *. H</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/minus">Negate</a></td>
<td class="code"> - B <span class="rank">0</span> </td>
<td class="desc">negate; don't confuse it with Negative Sign (<code>_</code>)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/minus#dyadic">Minus</a></td>
<td class="code"> <span class="rank">0</span> A - B <span class="rank">0</span> </td>
<td class="desc">subtract <code>B</code> from <code>A</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/minusdot">Not</a></td>
<td class="code"> -. B <span class="rank">0</span> </td>
<td class="desc">equivalent to <code>1 - B</code>; logical NOT for Booleans, complementary probability for interval [0, 1]</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/minusdot#dyadic">Less</a></td>
<td class="code"> <span class="rank">_</span> x -. y <span class="rank">_</span> </td>
<td class="desc">set difference; all atoms of <code>x</code> that are not in <code>y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/minusco">Halve</a></td>
<td class="code"> -: B <span class="rank">0</span> </td>
<td class="desc">equivalent to <code>B % 2</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/minusco#dyadic">Match</a></td>
<td class="code"> <span class="rank">_</span> x -: y <span class="rank">_</span> </td>
<td class="desc"><code>1</code> if entire nouns are the same in shape and elements (but not necessarily type), <code>0</code> otherwise</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/percent">Reciprocal</a></td>
<td class="code"> % B <span class="rank">0</span> </td>
<td class="desc">equivalent to <code>1 % B</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/percent#dyadic">Divide</a></td>
<td class="code"> <span class="rank">0</span> A % B <span class="rank">0</span> </td>
<td class="desc"><code>A</code> divided by <code>B</code> (note, that <code>(0 % 0) = 0</code>)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/percentdot">Matrix Inverse</a></td>
<td class="code"> %. B <span class="rank">2</span> </td>
<td class="desc">inverse matrix of square matrix <code>B</code> or left inverse, if <code>B</code> is not square</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/percentdot#dyadic">Matrix Divide</a></td>
<td class="code"> <span class="rank">_</span> A %. B <span class="rank">2</span> </td>
<td class="desc">equivalent to <code>(%. B) mux A</code>, where <code>mux</code> is <code>+/ . *</code> (see Matrix Product)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/percentco">Square Root</a></td>
<td class="code"> %: B <span class="rank">0</span> </td>
<td class="desc">square root</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/percentco#dyadic">Root</a></td>
<td class="code"> <span class="rank">_</span> A %: B <span class="rank">_</span> </td>
<td class="desc">the <code>A</code>-th root of <code>B</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hat">Exponential</a></td>
<td class="code"> ^ B <span class="rank">0</span> </td>
<td class="desc">the <code>B</code>-th power of e; the antilogarithm of a natural logarithm</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hat#dyadic">Power</a></td>
<td class="code"> <span class="rank">0</span> A ^ B <span class="rank">0</span> </td>
<td class="desc">the <code>B</code>-th power of <code>A</code> (<code>0^0</code>, <code>_^0</code>, <code>1^_</code> are equal to <code>1</code>)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hat#stope">Stope Function</a></td>
<td class="code"> <span class="rank">0</span> A ^ !.p B <span class="rank">0</span> </td>
<td class="desc">equivalent to <code>*/A + p * i. B</code>; the falling factorial when <code>p = _1</code>; see <a href="https://www.jsoftware.com/help/dictionary/samp28.htm">Stopes</a> and <a href="https://www.jsoftware.com/help/dictionary/d200.htm">Power</a> in Dictionary</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatdot">Natural Log</a></td>
<td class="code"> ^. y <span class="rank">0</span> </td>
<td class="desc">natural logarithm</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatdot#dyadic">Logarithm</a></td>
<td class="code"> <span class="rank">0</span> A ^. B <span class="rank">0</span> </td>
<td class="desc">logarithm of <code>B</code> to the base <code>A</code></td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatco">Fixed Power</a></td>
<td class="code"> <span class="rank">_</span> [x] u ^: n y <span class="rank">_</span> </td>
<td class="desc">apply verb <code>u</code> (or <code>x&u</code>, if dyadic) to <code>y</code>, <code>n</code> times</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatco">Fixed Power</a></td>
<td class="code"> <span class="rank">_</span> [x] u ^: <n y <span class="rank">_</span> </td>
<td class="desc">apply verb <code>u</code> (or <code>x&u</code>, if dyadic) to <code>y</code>, <code>(<n)-1</code> times, collecting results into a list</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatco">If</a></td>
<td class="code"> <span class="rank">_</span> [x] u ^: h y <span class="rank">_</span> </td>
<td class="desc">conditionally execute a verb</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatco">Inverse, aka Obverse</a></td>
<td class="code"> <span class="rank">_</span> [x] u ^: _1 y <span class="rank">_</span> </td>
<td class="desc">execute the <a href="https://code.jsoftware.com/wiki/Vocabulary/Inverses">obverse</a> (usually the inverse) of a verb, "undo the effect of applying the verb"</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatco">Converge</a></td>
<td class="code"> <span class="rank">_</span> [x] u ^: a: y <span class="rank">_</span> </td>
<td class="desc">apply the verb until the result stops changing</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatco">Converge</a></td>
<td class="code"> <span class="rank">_</span> [x] u ^: _ y <span class="rank">_</span> </td>
<td class="desc">apply the verb until the result stops changing</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatco">Dynamic Power</a></td>
<td class="code"> <span class="rank">_</span> [x] u ^: v y <span class="rank">_</span> </td>
<td class="desc">equivalent to <code>(x&u)^:(x v y)</code> or <code>u^:(v y)</code></td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/hatco">Do-While</a></td>
<td class="code"> <span class="rank">_</span> [x] u ^: v^:_ y <span class="rank">_</span> </td>
<td class="desc">execute <code>u</code> repeatedly until <code>v^:_</code> returns <code>0</code> or <code>u</code> returns its argument unchanged</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/dollar">Shape Of</a></td>
<td class="code"> $ y <span class="rank">_</span> </td>
<td class="desc">shape of the noun</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/dollar#dyadic">Shape</a></td>
<td class="code"> <span class="rank">1</span> x $ y <span class="rank">_</span> </td>
<td class="desc">reshape, return an array of items of <code>y</code> whose <a href="https://code.jsoftware.com/wiki/Vocabulary/Glossary#Frame">frame</a> is <code>x</code> (if <code>1 < #$y</code>, consider <code>$,</code>)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/dollardot">Sparse</a></td>
<td class="code"> $. B <span class="rank">_</span> </td>
<td class="desc">convert a dense array to sparse (see <a href="https://www.jsoftware.com/help/dictionary/d211.htm">Dictionary</a>)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/dollardot#dyadic">Sparse</a></td>
<td class="code"> <span class="rank">_</span> a $. B <span class="rank">_</span> </td>
<td class="desc">a collection of functions for creating and handling sparse arrays</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/dollarco">Self-Reference</a></td>
<td class="code"> <span class="rank">_</span> [x] $: y <span class="rank">_</span> </td>
<td class="desc">recursion, denotes the longest verb that contains it (within a sentence); provide default value</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/tilde">Reflex</a></td>
<td class="code"> u ~ y <span class="rank">_</span> </td>
<td class="desc">execute as a dyad with <code>x=y</code>, equivalent to <code>y u y</code></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/tilde#dyadic">Passive</a></td>
<td class="code"> <span class="rank">ru</span> x u ~ y <span class="rank">lu</span> </td>
<td class="desc">swap the arguments of a dyad, equivalent to <code>y u x</code></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/tildem">Evoke</a></td>
<td class="code"> m ~ <span class="rank"></span> </td>
<td class="desc">the value of the name <code>m</code>; works for non-nouns, in contast to <code>". m</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/tildedot">Nub</a></td>
<td class="code"> ~. y <span class="rank">_</span> </td>
<td class="desc">remove duplicates items, return only distinct items; order preserved</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/tildeco">Nub Sieve</a></td>
<td class="code"> ~: y <span class="rank">_</span> </td>
<td class="desc">boolean vector, <code>1</code> at positions of distinct items; <code>~. y</code> is equivalent to <code>(~: y) # y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/tildeco#dyadic">Not-Equal</a></td>
<td class="code"> <span class="rank">0</span> x ~: y <span class="rank">0</span> </td>
<td class="desc">compare corresponding atoms, <code>0</code> if equal, <code>1</code> if not; use Not Match <code>-.@-:</code> to compare two entire nouns</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bar">Magnitude</a></td>
<td class="code"> | B <span class="rank">0</span> </td>
<td class="desc">absolute value; magnitude, if the argument is complex</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bar#dyadic">Residue</a></td>
<td class="code"> <span class="rank">0</span> a | B <span class="rank">0</span> </td>
<td class="desc">the remainder when dividing a given number <code>B</code> by another given number <code>a</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bardot">Reverse</a></td>
<td class="code"> |. y <span class="rank">_</span> </td>
<td class="desc">rearrange the items in reverse order</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bardot#dyadic">Rotate</a></td>
<td class="code"> <span class="rank">_</span> A |. y <span class="rank">_</span> </td>
<td class="desc">rotates successive axes of <code>y</code> by successive elements of <code>A</code> (positive - to left, negative - to right)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bardot#dyadicfit">Shift</a></td>
<td class="code"> <span class="rank">_</span> A |. !.f y <span class="rank">_</span> </td>
<td class="desc">like Rotate, but use fill atom <code>f</code> to replace shifted out items</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bardot#monadicfit">Shift Right 1</a></td>
<td class="code"> |. !.f y <span class="rank">_</span> </td>
<td class="desc">equivalent to <code>_1 |.!.f y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/barco">Transpose</a></td>
<td class="code"> |: y <span class="rank">_</span> </td>
<td class="desc">reverse the axes (not the items!)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/barco#dyadic">Rearrange Axes</a></td>
<td class="code"> <span class="rank">1</span> A |: y <span class="rank">_</span> </td>
<td class="desc">the axes having indices <code>A</code> become the new last axes</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/barco#More_Information">Extract Diagonal</a></td>
<td class="code"> <span class="rank">1</span> (< A) |: y <span class="rank">_</span> </td>
<td class="desc">extract a diagonal of the array</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/dot">Determinant</a></td>
<td class="code"> u . v B <span class="rank">2</span> </td>
<td class="desc"><code>-/ . * B</code> is the determinant of the square matrix <code>B</code> (space before <code>.</code> is required)</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/dot#dyadic">Matrix Product</a></td>
<td class="code"> <span class="rank">_</span> A u . v B <span class="rank">_</span> </td>
<td class="desc"><code>A +/ . * B</code> is the inner product or matrix product; dot product of two vectors</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/cor">Def</a></td>
<td class="code"> m : n <span class="rank"></span> </td>
<td class="desc">define entities of all types (verbs, adverbs, conjunctions, nouns); see Direct Definition</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/NounExplicitDefinition">Def</a></td>
<td class="code"> 0 : 0 <span class="rank"></span> </td>
<td class="desc">define a multiline noun (can be used as a multiline comment), a table</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/cor">Def</a></td>
<td class="code"> 1 : 0 <span class="rank"></span> </td>
<td class="desc">define a multiline adverb</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/cor">Def</a></td>
<td class="code"> 2 : 0 <span class="rank"></span> </td>
<td class="desc">define a multiline conjunction</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/cor">Def</a></td>
<td class="code"> 3 : 0 <span class="rank"></span> </td>
<td class="desc">define a multiline monadic or dual-valence verb</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/cor">Def</a></td>
<td class="code"> 4 : 0 <span class="rank"></span> </td>
<td class="desc">define a multiline dyadic verb</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/cou">Monad-Dyad</a></td>
<td class="code"> u : v <span class="rank"></span> </td>
<td class="desc">derive a dual-valence verb: verb <code>u</code> if called monadically, verb <code>v</code> if called dyadically</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/codot">Obverse</a></td>
<td class="code"> u :. v <span class="rank"></span> </td>
<td class="desc">new verb that behaves as <code>u</code>, but its obverse is <code>v</code></td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/coco">Adverse</a></td>
<td class="code"> u :: v <span class="rank"></span> </td>
<td class="desc">run <code>v</code> if <code>u</code> fails (space after <code>u</code> is required)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/comma">Ravel</a></td>
<td class="code"> , y <span class="rank">_</span> </td>
<td class="desc">flatten; a list of all atoms in <code>y</code>, in the display order of <code>y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/comma#dyadic">Append</a></td>
<td class="code"> <span class="rank">_</span> x , y <span class="rank">_</span> </td>
<td class="desc">an array containing the items of <code>x</code> followed by the items of <code>y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/commadot">Ravel Items</a></td>
<td class="code"> ,. y <span class="rank">_</span> </td>
<td class="desc">a table where each row of the table comes from an item of <code>y</code> (no-op for tables)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/commadot#dyadic">Stitch</a></td>
<td class="code"> <span class="rank">_</span> x ,. y <span class="rank">_</span> </td>
<td class="desc">join each item of <code>x</code> to the corresponding item of <code>y</code>; equivalent to <code>x ,"_1 y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/commaco">Itemize</a></td>
<td class="code"> ,: y <span class="rank">_</span> </td>
<td class="desc">an array of shape <code>1, $y</code> with a single item <code>y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/commaco#dyadic">Laminate</a></td>
<td class="code"> <span class="rank">_</span> x ,: y <span class="rank">_</span> </td>
<td class="desc">a 2-item array with reshaped and itemized <code>x</code> as the first and <code>y</code> as the second item</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semi">Raze</a></td>
<td class="code"> ; y <span class="rank">_</span> </td>
<td class="desc">remove one level of boxing, concatenate the contents of the boxes into one long array</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semi#dyadic">Link</a></td>
<td class="code"> <span class="rank">_</span> x ; y <span class="rank">_</span> </td>
<td class="desc">build up a list of boxed items (don't box <code>y</code> if it's already boxed); heterogeneous arrays</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot0">Reversed</a></td>
<td class="code"> u ;. 0 y <span class="rank">_</span> </td>
<td class="desc">reverse <code>y</code> along all its axes, apply <code>u</code></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot0#dyadic">Subarray</a></td>
<td class="code"> <span class="rank">2</span> x u ;. 0 y <span class="rank">_</span> </td>
<td class="desc">extract subarray of <code>y</code>, described by <code>x</code>, apply <code>u</code> (<code>];.0</code> extracts w/o overtaking, unlike <code>{.</code>); substring</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot1">SelfIntervals</a></td>
<td class="code"> u ;. 1 y <span class="rank">_</span> </td>
<td class="desc">split <code>y</code>, include frets (= first item, start of an interval), apply <code>u</code> on each interval</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot1">SelfIntervals</a></td>
<td class="code"> u ;. _1 y <span class="rank">_</span> </td>
<td class="desc">split <code>y</code>, remove frets (= first item, start of an interval), apply <code>u</code> on each interval</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot1">SelfIntervals</a></td>
<td class="code"> u ;. 2 y <span class="rank">_</span> </td>
<td class="desc">split <code>y</code>, include frets (= last item, end of an interval), apply <code>u</code> on each interval</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot1">SelfIntervals</a></td>
<td class="code"> u ;. _2 y <span class="rank">_</span> </td>
<td class="desc">split <code>y</code>, remove frets (= last item, end of an interval), apply <code>u</code> on each interval</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot1#dyadic">Intervals</a></td>
<td class="code"> <span class="rank">1</span> G u ;. 1 y <span class="rank">_</span> </td>
<td class="desc">split <code>y</code>, include frets (where <code>G=1</code>, start of an interval), apply <code>u</code> on each interval</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot1#dyadic">Intervals</a></td>
<td class="code"> <span class="rank">1</span> G u ;. _1 y <span class="rank">_</span> </td>
<td class="desc">split <code>y</code>, remove frets (where <code>G=1</code>, start of an interval), apply <code>u</code> on each interval</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot1#dyadic">Intervals</a></td>
<td class="code"> <span class="rank">1</span> G u ;. 2 y <span class="rank">_</span> </td>
<td class="desc">split <code>y</code>, include frets (where <code>G=1</code>, end of an interval), apply <code>u</code> on each interval</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot1#dyadic">Intervals</a></td>
<td class="code"> <span class="rank">1</span> G u ;. _2 y <span class="rank">_</span> </td>
<td class="desc">split <code>y</code>, remove frets (where <code>G=1</code>, end of an interval), apply <code>u</code> on each interval</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot3#dyadic">Subarrays</a></td>
<td class="code"> <span class="rank">2</span> x u ;. _3 y <span class="rank">_</span> </td>
<td class="desc">apply <code>u</code> to each tile of a regular tiling of <code>y</code> specified by <code>x</code></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot3#dyadic">Subarrays</a></td>
<td class="code"> <span class="rank">2</span> x u ;. 3 y <span class="rank">_</span> </td>
<td class="desc">like <code>u;._3</code>, except that the results from uncompleted tiles are not discarded</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot3">Max Cubes</a></td>
<td class="code"> u ;. _3 y <span class="rank">_</span> </td>
<td class="desc">special case of <code>;._3</code>, where <code>x</code> holds the same size for all dimensions, given by <code>(#$y) $ <./ $y</code></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semidot3">Max Cubes</a></td>
<td class="code"> u ;. 3 y <span class="rank">_</span> </td>
<td class="desc">special case of <code>;.3</code>, where <code>x</code> holds the same size for all dimensions, given by <code>(#$y) $ <./ $y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semico">Words</a></td>
<td class="code"> ;: y <span class="rank">1</span> </td>
<td class="desc">partition a string into boxed words according to J's rules for word formation; tokenize; split</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/semico#dyadic">Sequential Machine</a></td>
<td class="code"> <span class="rank">_</span> x ;: y <span class="rank">_</span> </td>
<td class="desc">partition a string <code>y</code> according to the rules of a given finite-state machine defined by <code>x</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/number">Tally</a></td>
<td class="code"> # y <span class="rank">_</span> </td>
<td class="desc">count the items</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/number#dyadic">Copy</a></td>
<td class="code"> <span class="rank">1</span> A # y <span class="rank">_</span> </td>
<td class="desc"><code>A</code> controls how many times a corresponding item of <code>y</code> appears in a new array</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/numberdot">Base Two</a></td>
<td class="code"> #. G <span class="rank">1</span> </td>
<td class="desc">convert a binary list to an integer <code>5 -: #. 1 0 1</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/numberdot#dyadic">Base</a></td>
<td class="code"> <span class="rank">1</span> A #. B <span class="rank">1</span> </td>
<td class="desc">generalized <code>#.B</code> to bases other than 2 (including mixed bases); weighted sum</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/numberco">Antibase Two</a></td>
<td class="code"> #: B <span class="rank">_</span> </td>
<td class="desc">binary expansion of <code>B</code> as a Boolean list (two's complement form for negative numbers)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/numberco#dyadic">Antibase</a></td>
<td class="code"> <span class="rank">1</span> A #: B <span class="rank">0</span> </td>
<td class="desc">generalized <code>#:B</code> to bases other than 2 (including mixed bases); modulo; quotient/remainder; whole/fractional</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/Inverses#ConvertToBaseX">Base Inverse</a></td>
<td class="code"> <span class="rank">_</span> a #. ^:_1 B <span class="rank">_</span> </td>
<td class="desc">convert <code>B</code> to fixed base <code>a</code> (finds out length of the result automatically, unlike <code>#:</code>)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bang">Factorial</a></td>
<td class="code"> ! B <span class="rank">0</span> </td>
<td class="desc">factorial; generally, compute the <a href="https://en.wikipedia.org/wiki/Gamma_function">Gamma function</a> of <code>1+B</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bang#dyadic">Out Of</a></td>
<td class="code"> <span class="rank">0</span> A ! B <span class="rank">0</span> </td>
<td class="desc"><code>B</code>-Combinations-<code>A</code>; number of ways to choose <code>A</code> items from <code>B</code>; binomial coefficients; <a href="https://en.wikipedia.org/wiki/Pascal%27s_triangle">Pascal's triangle</a></td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bangdot">Fit (Customize)</a></td>
<td class="code"> <span class="rank">lu</span> u !. n <span class="rank">ru</span> </td>
<td class="desc">variants of primitive verb: adjust comparison tolerance, fill atom, print precision, compensated sum, etc</td>
</tr>
<tr class="conj">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bangco">Foreign</a></td>
<td class="code"> <span class="rank">0</span> m !: n <span class="rank">0</span> </td>
<td class="desc"><a href="https://code.jsoftware.com/wiki/Vocabulary/Foreigns">system functions</a></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/slash">Insert</a></td>
<td class="code"> u / y <span class="rank">_</span> </td>
<td class="desc">inserts (dyad) <code>u</code> between the items of <code>y</code>; reduce</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/slash#dyadic">Table</a></td>
<td class="code"> <span class="rank">_</span> x u / y <span class="rank">_</span> </td>
<td class="desc">a table (if <code>0 = #$u</code>) having entries <code>a u b</code> for every <code>a</code> in <code>x</code> and <code>b</code> in <code>y</code>; equivalent to <code>x u"(lu,_) y</code></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/slashdot">Oblique</a></td>
<td class="code"> u /. y <span class="rank">_</span> </td>
<td class="desc">apply <code>u</code> to the oblique diagonals of table <code>y</code></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/slashdot#dyadic">Key</a></td>
<td class="code"> <span class="rank">_</span> x u /. y <span class="rank">_</span> </td>
<td class="desc">apply <code>u</code> to each partition of <code>y</code>, based on keys from <code>x</code>; group by</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/slashco">Grade Up</a></td>
<td class="code"> /: y <span class="rank">_</span> </td>
<td class="desc">permutation that sorts the items of <code>y</code> into ascending order (stable sort)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/slashco#dyadic">Sort Up [Using]</a></td>
<td class="code"> <span class="rank">_</span> x /: y <span class="rank">_</span> </td>
<td class="desc">apply to list <code>x</code> the permutation that sorts list <code>y</code> into ascending order; equivalent to <code>(/: y) { x</code>; sort <code>/:~y</code></td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bslash">Prefix</a></td>
<td class="code"> u \ y <span class="rank">_</span> </td>
<td class="desc">apply <code>u</code> to successive prefixes of <code>y</code> of increasing length (the main use is in <code>u/\</code>, e.g. cumulative sum)</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bslash#dyadic">Infix</a></td>
<td class="code"> <span class="rank">0</span> a u \ y <span class="rank">_</span> </td>
<td class="desc">apply <code>u</code> to successive (overlapping if <code>a > 0</code>) parts of <code>y</code>; sliding window</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bslashdot">Suffix</a></td>
<td class="code"> u \. y <span class="rank">_</span> </td>
<td class="desc">apply <code>u</code> to successive suffixes of <code>y</code> of decreasing length (the main use is in <code>u/\.</code>, calculated in reverse order)</td>
</tr>
<tr class="adverb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/bslashdot#dyadic">Outfix</a></td>
<td class="code"> <span class="rank">_</span> x u \. y <span class="rank">_</span> </td>
<td class="desc">apply <code>u</code> to <code>y</code> with successive (overlapping if <code>x > 0</code>) parts removed</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/slashco">Grade Down</a></td>
<td class="code"> \: y <span class="rank">_</span> </td>
<td class="desc">permutation that sorts the items of <code>y</code> into descending order (stable sort)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/slashco#dyadic">Sort Down [Using]</a></td>
<td class="code"> <span class="rank">_</span> x \: y <span class="rank">_</span> </td>
<td class="desc">apply to list <code>x</code> the permutation that sorts list <code>y</code> into descending order; equivalent to <code>(\: y) { x</code>; sort <code>\:~y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/squarelf">Same</a></td>
<td class="code"> [ y <span class="rank">_</span> </td>
<td class="desc">return <code>y</code> unchanged; equivalent to <code>y</code> and to <code>] y</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/squarelf#dyadic">Left</a></td>
<td class="code"> <span class="rank">_</span> x [ y <span class="rank">_</span> </td>
<td class="desc">return <code>x</code>; separate assignments on the same line; useful in tacit verbs to get the value of <code>x</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/squarelfco">Cap</a></td>
<td class="code"> <span class="rank">_</span> [x] [: y <span class="rank">_</span> </td>
<td class="desc">in tacit phrase <code>[: f g</code> equivalent to <code>g@:h</code>; domain error as monad or dyad</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/squarert">Same</a></td>
<td class="code"> ] y <span class="rank">_</span> </td>
<td class="desc">return <code>y</code> unchanged; equivalent to <code>y</code> and to <code>[ y</code>; useful to display assignment as in <code>] z =: i:2</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/squarert#dyadic">Right</a></td>
<td class="code"> <span class="rank">_</span> x ] y <span class="rank">_</span> </td>
<td class="desc">return <code>y</code>; useful to separate two numeric atoms to prevent J treating them as a single list <code>i."0 ] 3 4 5</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/curlylf">Catalogue</a></td>
<td class="code"> { y <span class="rank">1</span> </td>
<td class="desc">combine items from the atoms inside a boxed list to form a catalogue; <a href="https://en.wikipedia.org/wiki/Cartesian_product">Cartesian product</a></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/curlylf#dyadic">From</a></td>
<td class="code"> <span class="rank">0</span> A { y <span class="rank">_</span> </td>
<td class="desc">select the item with index <code>A</code> from <code>y</code>; index along multiple axes, select subarrays, etc with boxed <code>A</code></td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/curlylfdot">Head</a></td>
<td class="code"> {. y <span class="rank">_</span> </td>
<td class="desc">the first item of <code>y</code>; convert a single-item list into an atom</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/curlylfdot#dyadic">Take</a></td>
<td class="code"> <span class="rank">1</span> A {. y <span class="rank">_</span> </td>
<td class="desc">the first (last if <code>A</code> is negative) <code>A</code> items of <code>y</code>; if <code>A > #y</code>, the result will have <code>A</code> items (fill atoms added)</td>
</tr>
<tr class="verb">
<td class="name"><a class="link" href="https://code.jsoftware.com/wiki/Vocabulary/curlylfco">Tail</a></td>