You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-7Lines changed: 24 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -33,13 +33,30 @@ No more elements are mapped or checked, because it is not necessary.
33
33
34
34
## Current Operators
35
35
36
-
* filter
37
-
* map
38
-
* flatMap
39
-
* distinct
40
-
* first
41
-
* some
42
-
* every
36
+
### Intermetiate Operators
37
+
38
+
There can be as many intermediate operators as you want in a pipe. In an intermediate operator is the last operator of a pipe, the result of the pipe call will be an array.
39
+
40
+
*__filter__<br />
41
+
Gets a function that takes an element and returns a boolean. The elements where the function returns true survive.
42
+
*__map__<br />
43
+
Gets a function and applies each element to that function.
44
+
*__flatMap__
45
+
The operator gets a function that maps to an array of elements and flattens them.
46
+
*__distinct__
47
+
Removes duplicated elements. It's important to not, that this is a statefull operator.
48
+
49
+
### Terminal Operators
50
+
51
+
A terminal operator has to be the last one in a pipe. Also, there can only be on terminal operator in a pipe.<br />
52
+
If the terminal operator
53
+
54
+
*__first__<br />
55
+
Gets a function that takes an element and returns a boolean. If an element is evaluated to true that element is immediately returned by the pipe.
56
+
*__some__<br />
57
+
Some works similar to the `first`-operator except that not the element is returned, but the value `true` as soon as the passed function evaluates to true.
58
+
*__every__<br />
59
+
`every` also applies the passed function to each element. As soon as one element does not evaluate to `true` the pipe immediately returns `false`.
0 commit comments