We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d73c1d8 commit d2fe63bCopy full SHA for d2fe63b
java/src/main/java/v/o/i/d/monadsplain/Three.java
@@ -26,15 +26,15 @@ public IntegerWithHistory square(IntegerWithHistory i) {
26
);
27
}
28
29
- public IntegerWithHistory addOne(IntegerWithHistory i) {
+ public IntegerWithHistory increment(IntegerWithHistory i) {
30
return new IntegerWithHistory(
31
i.value + 1,
32
- join(i.history, "addOne: " + i.value)
+ join(i.history, "increment: " + i.value)
33
34
35
36
public void run() {
37
- IntegerWithHistory i = addOne(square(IntegerWithHistory.wrap(3)));
+ IntegerWithHistory i = increment(square(IntegerWithHistory.wrap(3)));
38
System.out.println(i.value);
39
System.out.println(Arrays.toString(i.history));
40
0 commit comments