mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 14:00:14 +00:00
implement faster map on Lazy
This commit is contained in:
1 parent
a66c2a0749
commit
e706ef89fc
1 file changed
+1
-1
@@ -45,7 +45,7 @@ public final class Lazy<T> implements Monad<T, Lazy<?>> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull <U> Lazy<U> map(@NotNull Function<T, U> map) {
|
public @NotNull <U> Lazy<U> map(@NotNull Function<T, U> map) {
|
||||||
return (Lazy<U>) Monad.super.map(map);
|
return lazy(() -> map.apply(value()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in new issue
Block a user