Skip to content

Commit 172c8d6

Browse files
committed
Housekeeping
1 parent 85a79ef commit 172c8d6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/main/java/com/jnape/palatable/lambda/functions/builtin/fn2/GroupBy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import static com.jnape.palatable.lambda.functions.builtin.fn3.FoldLeft.foldLeft;
1313

1414
/**
15-
* Given an <code>Iterable&lt;V&gt;</code> <code>vs</code> and a key function <code>V -&gt; K</code> <code>f</code>, fold
16-
* <code>vs</code> into a <code>Map&lt;K, List&lt;V&gt;&gt;</code> by applying <code>f</code> to each element of
15+
* Given an <code>Iterable&lt;V&gt;</code> <code>vs</code> and a key function <code>V -&gt; K</code> <code>f</code>,
16+
* fold <code>vs</code> into a <code>Map&lt;K, List&lt;V&gt;&gt;</code> by applying <code>f</code> to each element of
1717
* <code>vs</code>, retaining values that map to the same key in a list, in the order they were iterated in.
1818
*
1919
* @param <K> the Map key type
@@ -32,7 +32,7 @@ public Map<K, List<V>> apply(Function<? super V, ? extends K> keyFn, Iterable<V>
3232
return foldLeft((m, v) -> {
3333
m.computeIfAbsent(keyFn.apply(v), __ -> new ArrayList<>()).add(v);
3434
return m;
35-
}, new HashMap<K, List<V>>(), vs);
35+
}, new HashMap<>(), vs);
3636
}
3737

3838
@SuppressWarnings("unchecked")

src/main/java/com/jnape/palatable/lambda/functions/builtin/fn2/Slide.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Iterable} by one element at a time, returning an <code>{@link Iterable}&lt;{@link Iterable}&lt;A&gt;&gt;</code>.
1515
* <p>
1616
* Example:
17-
* <p>
17+
*
1818
* <code>slide(2, asList(1, 2, 3, 4, 5)); // [[1, 2], [2, 3], [3, 4], [4, 5]]</code>
1919
*
2020
* @param <A> the Iterable element type

src/main/java/com/jnape/palatable/lambda/functions/builtin/fn3/Times.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* <code>n</code> times, returning the result.
1616
* <p>
1717
* Example:
18-
* <p>
18+
*
1919
* <code>times(3, x -&gt; x + 1, 0); // 3</code>
2020
*
2121
* @param <A> the input and output type

src/main/java/com/jnape/palatable/lambda/iteration/ImmutableQueue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ImmutableQueue<A> tail() {
112112
if (!outTail.isEmpty())
113113
return new NonEmpty<>(outTail, inbound);
114114

115-
ImmutableStack<A> newOutbound = foldLeft(ImmutableStack::push, ImmutableStack.<A>empty(), inbound);
115+
ImmutableStack<A> newOutbound = foldLeft(ImmutableStack::push, ImmutableStack.empty(), inbound);
116116
return newOutbound.isEmpty() ? empty() : new NonEmpty<>(newOutbound, ImmutableStack.empty());
117117
}
118118
}

0 commit comments

Comments
 (0)