Anonymous user
Category:J: Difference between revisions
no edit summary
(→Todo) |
imported>Katsumi No edit summary |
||
Line 19:
== The J language ==
A frequent reaction when one first encounters a J program is often something along the lines of "that's cheating". The thought here is that the problem could not possibly be that simple, so
The flip side of this issue is that J is a dialect of APL
== Introduction ==
Line 33:
Object-module and imperative techniques are supported, but not required.
The J programming language was designed and developed by [
<br clear="all"/>
Line 49:
For example, the phrase <code>(+/ % #)</code> finds the average of a list of numbers.
<syntaxhighlight lang="j">
2
</syntaxhighlight>
To understand how this works, you might try working with simpler sentences and their variations.
<syntaxhighlight lang="j">
6
+/4 5 6
Line 67 ⟶ 70:
5
(+/ % #) 4 5 6
5
</syntaxhighlight>
By themselves, these experiments mean nothing, but if you know that +/ was finding the sum of a list and # was finding the length of a list and that % was dividing the two quantities (and looks almost like one of the old school division symbols) then these experiments might help confirm that you have understood things properly.
== Some
If you wish to use J you will also have to learn a few grammatical rules (J's parser has [http://www.jsoftware.com/help/dictionary/dicte.htm 9 reduction rules] and "shift" and "accept" - the above examples use four of those rules). J verbs have two definitions - a single argument "monadic" definition and a two argument "dyadic" definition.
Line 97 ⟶ 101:
Discussion of the goals of the J community on RC and general guidelines for presenting J solutions takes place at [[J/HouseStyle|House Style]].
== Jedi on RosettaCode ==
|