Skip to content

Commit 369986e

Browse files
committed
Use instance method reference in IOWalkthrough
1 parent ca19d28 commit 369986e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

demo/src/main/java/fj/demo/IOWalkthrough.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static void main(String[] args) {
4949

5050
// now we create a function which takes a string, upper cases it and creates an IO value that would print the upper cased string if executed
5151

52-
final F<String, IO<Unit>> upperCaseAndPrint = F1Functions.<String, IO<Unit>, String>o(IOFunctions::stdoutPrintln).f(s -> s.toUpperCase());
52+
final F<String, IO<Unit>> upperCaseAndPrint = F1Functions.<String, IO<Unit>, String>o(IOFunctions::stdoutPrintln).f(String::toUpperCase);
5353

5454
// we now want to compose reading the name with printing it, for that we need to have access to the runtime value that is returned when the
5555
// IO value for read is executed, hence we use fj.data.IOFunctions.bind instead of fj.data.IOFunctions.append

0 commit comments

Comments
 (0)