Skip to content

Commit

Permalink
more code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tonivade committed Nov 19, 2023
1 parent 3723ffb commit 0ee6349
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public boolean isDefinedAt(A value) {
return function.isDefinedAt(value);
}

public Pattern1<A, R> add(Matcher1<A> matcher, Function1<A, R> handler) {
protected Pattern1<A, R> add(Matcher1<A> matcher, Function1<A, R> handler) {
return new Pattern1<>(function.orElse(PartialFunction1.of(matcher, handler)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static <F extends Witness> Monad<Kind<Free_, F>> monadF() {
return FreeMonad.INSTANCE;
}

public static <F extends Witness, G extends Witness> FunctionK<F, Kind<Free_, G>> functionKF(FunctionK<F, G> functionK) {
static <F extends Witness, G extends Witness> FunctionK<F, Kind<Free_, G>> functionKF(FunctionK<F, G> functionK) {
return new FunctionK<>() {
@Override
public <T> Free<G, T> apply(Kind<F, ? extends T> from) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ default <G extends Witness> Kind<G, A> foldMap(FunctionK<F, G> functionK, Applic
if (function.remaining > 1) {
fns.addFirst(new CurriedFunction(res, function.remaining - 1));
}
} while (function.remaining == 1 && fns.size() > 0);
} while (function.remaining == 1 && !fns.isEmpty());
}

if (fns.isEmpty()) {
Expand Down

0 comments on commit 0ee6349

Please sign in to comment.