mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 02:20:57 +00:00
implement faster map on Lazy
This commit is contained in:
@@ -45,7 +45,7 @@ public final class Lazy<T> implements Monad<T, Lazy<?>> {
|
||||
|
||||
@Override
|
||||
public @NotNull <U> Lazy<U> map(@NotNull Function<T, U> map) {
|
||||
return (Lazy<U>) Monad.super.map(map);
|
||||
return lazy(() -> map.apply(value()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user