Skip to content

.FlatMap function? #3

@BigB84

Description

@BigB84

Hi,

I really loved your library! However I couldn't find java .flatMap or go youthlin-stream .FlatMap equivalent.

Example:
A stream of different size string arrays into stream of these arrays content:
{ [a], [b, c], [d, e, f] } into { a, b, c, d, e, f }

Legend:
{} <- stream
[] <- non empty array that may contain min 1 string
a,b,c,... <- different length (in my case) strings

I need to call FlatMap in the middle of parallel executing stream, before I have 2 filter and 3 map calls, after 2 Map and 2 Filter calls.
I operate on 87 sets of data between 30 to 2'000'000 records that's why I really need parallel execution. (for each record i have regex, comparison to other string, etc. ) I shouldn't create additional middle datasets because it'd be huge memory leak

Thanks in advance :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions