Skip to content

Commit c6ef167

Browse files
committed
Fixing up javadocs
1 parent 1a75a02 commit c6ef167

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/main/java/com/jnape/palatable/lambda/adt/Either.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public final R recover(Function<? super L, ? extends R> recoveryFn) {
5353
}
5454

5555
/**
56-
* Inverse of recover. If this is a right value, apply the wrapped value to forfeitFn and return it; otherwise,
57-
* return the wrapped left value;
56+
* Inverse of recover. If this is a right value, apply the wrapped value to <code>forfeitFn</code> and return it;
57+
* otherwise, return the wrapped left value.
5858
*
5959
* @param forfeitFn a function from R to L
6060
* @return either the wrapped value (if left) or the result of the right value applied to forfeitFn

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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 -> K</code> <code>f</code>, fold
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
1616
* <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
*

src/main/java/com/jnape/palatable/lambda/functor/Applicative.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* <li>identity: <code>v.zip(pureId).equals(v)</code></li>
1616
* <li>composition: <code>w.zip(v.zip(u.zip(pureCompose))).equals((w.zip(v)).zip(u))</code></li>
1717
* <li>homomorphism: <code>pureX.zip(pureF).equals(pureFx)</code></li>
18-
* <li>interchange: <code>pureY.zip(u).equals(u.zip(pure(f -> f.apply(y))))</code></li>
18+
* <li>interchange: <code>pureY.zip(u).equals(u.zip(pure(f -&gt; f.apply(y))))</code></li>
1919
* </ul>
2020
* As with <code>Functor</code>, <code>Applicative</code> instances that do not satisfy all of the functor laws, as well
2121
* as the above applicative laws, are not well-behaved and often break down in surprising ways.

src/main/java/com/jnape/palatable/lambda/lens/Lens.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ <F extends Functor, FT extends Functor<T, F>, FB extends Functor<B, F>> FT apply
144144
* Although the Java type system does not allow enforceability, the functor instance FT should be the same as FB,
145145
* only differentiating in their parameters.
146146
*
147+
* @param <F> the common functor type of FT and FB
147148
* @param <FT> the type of the lifted T
148149
* @param <FB> the type of the lifted B
149150
* @return the lens, "fixed" to the functor

src/main/java/com/jnape/palatable/lambda/traversable/Traversable.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
* <ul>
1616
* <li>naturality: <code>t.apply(trav.traverse(f, pure).&lt;Object&gt;fmap(id()).coerce())
1717
* .equals(trav.traverse(t.compose(f), pure2).&lt;Object&gt;fmap(id()).coerce())</code></li>
18-
* <li>identity: <code>trav.traverse(Identity::new, x -> new Identity&lt;&gt;(x)).equals(new
18+
* <li>identity: <code>trav.traverse(Identity::new, x -&gt; new Identity&lt;&gt;(x)).equals(new
1919
* Identity&lt;&gt;(trav)</code></li>
20-
* <li>composition: <code>trav.traverse(f.andThen(x -> x.fmap(g)).andThen(Compose::new), x ->
20+
* <li>composition: <code>trav.traverse(f.andThen(x -&gt; x.fmap(g)).andThen(Compose::new), x -&gt;
2121
* new Compose&lt;&gt;(new Identity&lt;&gt;(new Identity&lt;&gt;(x)))).equals(new Compose&lt;Identity, Identity,
22-
* Traversable&lt;Object, Trav&gt;&gt;(trav.traverse(f, x -> new Identity&lt;&gt;(x)).fmap(t ->
23-
* t.traverse(g, x -> new Identity&lt;&gt;(x)))))</code></li>
24-
* <p>
22+
* Traversable&lt;Object, Trav&gt;&gt;(trav.traverse(f, x -&gt; new Identity&lt;&gt;(x)).fmap(t -&gt;
23+
* t.traverse(g, x -&gt; new Identity&lt;&gt;(x)))))</code></li>
2524
* </ul>
2625
* <p>
2726
* For more information, read about

0 commit comments

Comments
 (0)