Top "Flatmap" questions

flatMap is a Java and Scala function that works by applying a function that returns a sequence for each element in the list, and flattening the results into the original list.

How to flatten List of Lists in Kotlin?

I have a list of objects of class AA that contain a date and a list of objects of class …

android list kotlin android-recyclerview flatmap
Why is this usage of Stream::flatMap wrong?

I expected to be able to use Stream::flatMap like this public static List<String> duplicate(String s) { …

java java-8 java-stream flatmap
Swift: Flatten an array of dictionaries to one dictionary

In Swift, I am trying to flatten an array of dictionaries into one dictionary i.e let arrayOfDictionaries = [["key1": "value1"], ["…

arrays swift dictionary functional-programming flatmap
How to use the 'flatmap' operator conditionally ? (Angular 2/rxjs)

What I'm trying to achieve is to run a series of observables conditionally. return observable.map(response => response) .flatmap(…

angular ecmascript-6 rxjs rxjs5 flatmap
Is there any difference between flatten and flatMap(identity)?

scala> List(List(1), List(2), List(3), List(4)) res18: List[List[Int]] = List(List(1), List(2), List(3), List(4)) scala> res18.flatten …

scala functional-programming flatmap
convert list of map to map using flatMap

How I can merge List<Map<String,String>> to Map<String,String> using flatMap? …

java java-8 flatmap
Flatmap on dataframe

What is the best way to preform a flatMap on a DataFrame in spark? From searching around and doing some …

scala apache-spark dataframe flatmap