Skip to content

Commit ef0fe4a

Browse files
authored
Update CrazyOptionals.java
1 parent 940fa2d commit ef0fe4a

File tree

1 file changed

+1
-1
lines changed
  • 5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp

1 file changed

+1
-1
lines changed

5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp/CrazyOptionals.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public static void processAccountWithMaxBalance(List<Account> accounts, AccountS
248248
*/
249249
public static double calculateTotalCreditBalance(List<CreditAccount> accounts) {
250250
// If you have a stream of optionals and you want to filter empty ones, you can do the trick and call
251-
// `Stream#flatMap` and pass `Optional#sream`. This logic transforms each optional object into a stream of either
251+
// `Stream#flatMap` and pass `Optional#stream`. This logic transforms each optional object into a stream of either
252252
// one of zero elements and then all those streams are flattened into one using `flatMap` which automatically
253253
// filters all empty optional
254254
return accounts.stream()

0 commit comments

Comments
 (0)