1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
| Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6));
Seq.of(1, 2, 3, 4).contains(2);
Seq.of(1, 2, 3, 4).containsAll(2, 3);
Seq.of(1, 2, 3, 4).containsAny(2, 5);
Seq.of(1, 2).crossJoin(Seq.of("A", "B"));
Seq.of(1, 2).crossSelfJoin()
Seq.of(1, 2, 3).cycle();
Seq.of(1, 2, 3).duplicate();
Seq.of("a", "b", "c").foldLeft("!", (u, t) -> u + t);
Seq.of("a", "b", "c").foldRight("!", (t, u) -> t + u);
Seq.of(1, 2, 3, 4).groupBy(i -> i % 2);
Seq.of(1, 2, 3, 4).grouped(i -> i % 2);
Seq.of(1, 2, 4).innerJoin(Seq.of(1, 2, 3), (a, b) -> a == b);
Seq.of(1, 2).innerSelfJoin((t, u) -> t != u)
Seq.of(1, 2, 3, 4).intersperse(0);
Seq.of(1, 2, 3).join();
Seq.of(1, 2, 3).join(", ");
Seq.of(1, 2, 3).join("|", "^", "$");
Seq.of(1, 2, 4).leftOuterJoin(Seq.of(1, 2, 3), (a, b) -> a == b);
Seq.of(tuple(1, 0), tuple(2, 1)).leftOuterSelfJoin((t, u) -> t.v2 == u.v1)
Seq.of(1, 2, 3, 4, 5).limitWhile(i -> i < 3);
Seq.of(1, 2, 3, 4, 5).limitUntil(i -> i == 3);
Seq.of(new Object(), 1, "B", 2L).ofType(Number.class);
Seq.of(1, 2, 4).rightOuterJoin(Seq.of(1, 2, 3), (a, b) -> a == b);
Seq.of(tuple(1, 0), tuple(2, 1)).rightOuterSelfJoin((t, u) -> t.v1 == u.v2)
Seq.of(1, 2, 3, 4).partition(i -> i % 2 != 0);
Seq.of(1, 2, 3, 4).remove(2);
Seq.of(1, 2, 3, 4).removeAll(2, 3, 5);
Seq.of(1, 2, 3, 4).retainAll(2, 3, 5);
Seq.of(1, 2, 3, 4).reverse();
Seq.of(1, 2, 3, 4, 5).shuffle();
Seq.of(1, 2, 3, 4, 5).skipWhile(i -> i < 3);
Seq.of(1, 2, 3, 4, 5).skipUntil(i -> i == 3);
Seq.of(1, 2, 3, 4, 5).slice(1, 3)
Seq.of(1, 2, 3, 4, 5).splitAt(2);
Seq.of(1, 2, 3, 4, 5).splitAtHead();
Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"));
Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (x, y) -> x + ":" + y);
Seq.of("a", "b", "c").zipWithIndex();
|