26 |
|
* <p>The naming conventions are as follows: |
27 |
|
* <ul> |
28 |
|
* |
29 |
< |
* <li> The name of the single method declared in each interface is |
29 |
> |
* <li>The name of the single method declared in each interface is |
30 |
|
* simply {@code op} (short for "operate"). |
31 |
|
* |
32 |
< |
* <li> An {@code Op} (short for "operation") maps a single argument to |
32 |
> |
* <li>An {@code Op} (short for "operation") maps a single argument to |
33 |
|
* a result. Example: negating a value. |
34 |
|
* |
35 |
< |
* <li> The names for scalar ops accepting and returning the same type |
35 |
> |
* <li>The names for scalar ops accepting and returning the same type |
36 |
|
* are prefaced by their type name. |
37 |
|
* |
38 |
< |
* <li> A {@code BinaryOp} maps two arguments to a result. Example: |
38 |
> |
* <li>A {@code BinaryOp} maps two arguments to a result. Example: |
39 |
|
* dividing two numbers |
40 |
|
* |
41 |
|
* <li>A {@code Reducer} is an <em>associative</em> binary op |
43 |
|
* c)) should have the same result as op(op(a, b), c). Example: |
44 |
|
* adding two numbers. |
45 |
|
* |
46 |
< |
* <li> Scalar binary ops accepting and returning the same type |
46 |
> |
* <li>Scalar binary ops accepting and returning the same type |
47 |
|
* include their type name. |
48 |
|
* |
49 |
< |
* <li> Mixed-type operators are named just by their argument type |
49 |
> |
* <li>Mixed-type operators are named just by their argument type |
50 |
|
* names. |
51 |
|
* |
52 |
< |
* <li> A {@code Generator} takes no arguments and returns a result. |
52 |
> |
* <li>A {@code Generator} takes no arguments and returns a result. |
53 |
|
* Examples: random number generators, builders |
54 |
|
* |
55 |
< |
* <li> A {@code Procedure} accepts an argument but doesn't return a |
55 |
> |
* <li>A {@code Procedure} accepts an argument but doesn't return a |
56 |
|
* result. Example: printing a value. An {@code Action} is a |
57 |
|
* Procedure that takes no arguments. |
58 |
|
* |