From 46cd6f7aaa9aa878f11d61b3336a22a468ed992e Mon Sep 17 00:00:00 2001 From: Sandor Dargo Date: Mon, 9 Oct 2017 21:46:41 +0200 Subject: [PATCH] docs: Fix some typos in ComposableListSolutions and ComposableListExercises --- src/main/java/learnrxjava/ComposableListExercises.java | 4 ++-- src/main/java/learnrxjava/ComposableListSolutions.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/learnrxjava/ComposableListExercises.java b/src/main/java/learnrxjava/ComposableListExercises.java index a13940c..6e05955 100644 --- a/src/main/java/learnrxjava/ComposableListExercises.java +++ b/src/main/java/learnrxjava/ComposableListExercises.java @@ -307,12 +307,12 @@ public static ComposableList exercise9() { /* Exercise 10: Implement concatMap() - To flatten trees with nested forEach expressions we accumlate the results in a new flat list. Querying a List + To flatten trees with nested forEach expressions we accumulate the results in a new flat list. Querying a List of data from a Tree is a very common operation. Ideally we'd be able to use a helper function to do the heavy lifting for us. Let's implement the concatMap() method for List. Like map(), the concatMap() function applies a projection - function to each item in a list. However the projection function passed to concatMap tranforms each individual + function to each item in a list. However the projection function passed to concatMap transforms each individual value into a _list of values_, creating a tree structure. Before returning the tree, the concatMap method flattens the tree by concatenating each inner list together in order. Here's an example of concatMap in action: diff --git a/src/main/java/learnrxjava/ComposableListSolutions.java b/src/main/java/learnrxjava/ComposableListSolutions.java index c2256d2..4e3d3e5 100644 --- a/src/main/java/learnrxjava/ComposableListSolutions.java +++ b/src/main/java/learnrxjava/ComposableListSolutions.java @@ -318,12 +318,12 @@ public static ComposableList exercise9() { /* Exercise 10: Implement concatMap() - To flatten trees with nested forEach expressions we accumlate the results in a new flat list. Querying a List + To flatten trees with nested forEach expressions we accumulate the results in a new flat list. Querying a List of data from a Tree is a very common operation. Ideally we'd be able to use a helper function to do the heavy lifting for us. Let's implement the concatMap() method for List. Like map(), the concatMap() function applies a projection - function to each item in a list. However the projection function passed to concatMap tranforms each individual + function to each item in a list. However the projection function passed to concatMap transforms each individual value into a _list of values_, creating a tree structure. Before returning the tree, the concatMap method flattens the tree by concatenating each inner list together in order. Here's an example of concatMap in action: