Skip to content

Commit

Permalink
new map variant
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrimatti committed Dec 10, 2024
1 parent 37088f1 commit 7dd2570
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fi.solita.utils</groupId>
<artifactId>functional-utils</artifactId>
<version>0.12.57</version>
<version>0.12.58</version>
<build>
<resources>
<resource>
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/fi/solita/utils/functional/Functional.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ public static final <S1, S2, T> Iterable<T> map(ApplyBi<? super S1, ? super S2,
public static final <S1, S2, S3, T> Iterable<T> map(Apply3<? super S1, ? super S2, ? super S3, ? extends T> f, Iterable<Tuple3<S1, S2, S3>> xs) {
return FunctionalImpl.map(Function.of(f), xs);
}

/**
* @return all elements in {@code xs} transformed with {@code f}.
*/
public static final <S1, S2, S3, S4, T> Iterable<T> map(Apply4<? super S1, ? super S2, ? super S3, ? super S4, ? extends T> f, Iterable<Tuple4<S1, S2, S3, S4>> xs) {
return FunctionalImpl.map(Function.of(f), xs);
}

/**
* @return all elements in {@code xs} transformed with {@code f1} and {@code f2} respectively.
Expand Down

0 comments on commit 7dd2570

Please sign in to comment.