Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lambda/task1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ static Supplier<Calculator> instance = Calculator::new;
BinaryOperator<Integer> plus = (x, y) -> x + y;
BinaryOperator<Integer> minus = (x, y) -> x - y;
BinaryOperator<Integer> multiply = (x, y) -> x * y;
BinaryOperator<Integer> devide = (x, y) -> x / y;
BinaryOperator<Integer> divide = (x, y) -> x / y;
```
Добавьте несколько переменных типа `UnaryOperator` для произведения математических операций над одним числом:
```java
Expand All @@ -35,7 +35,7 @@ Calculator calc = Calculator.instance.get();
```java
int a = calc.plus.apply(1, 2);
int b = calc.minus.apply(1,1);
int c = calc.devide.apply(a, b);
int c = calc.divide.apply(a, b);
```
И выведите в консоль результат:
```java
Expand Down