Function definition: Difference between revisions

J: explicit definition.
(added Go)
(J: explicit definition.)
Line 338:
 
Works on arrays of any rank (any number of dimensions): atoms, lists, tables, etc.
 
Or, more verbosely (and a bit slower):
 
<lang J>multiply=: dyad define
x * y
)</lang>
 
Here we use an [http://www.jsoftware.com/help/dictionary/intro18.htm explicit] definition (where the arguments are named) rather than a [http://www.jsoftware.com/help/dictionary/intro19.htm tacit] version (where the arguments are implied). In explicit J verbs, x is the left argument and y is the right argument.
 
=={{header|Java}}==
6,962

edits