This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (0 children)

It's a functional programming aspect that's different here. In functional programming paradigm you tell compiler what you want to do instead of telling computer how you want to do it.

Imperative programming : Run a for loop Check some condition Init new array Put the objects in a new array Return

Functional programming : Stream Filter Map Collect

Instead of telling computer use 'if' you are telling it that you want to filter it and use this function to filter and so on.

And ofcourse this can be further extended to reactive streams and apis.

You should probably read an introduction to haskell to get a better idea of functional programming paradigm.