File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
props-core/src/test/java/fj Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -262,11 +262,11 @@ public final P1<A> memo() {
262262 public P1 <A > softMemo () { return new SoftReferenceMemo <>(this ); }
263263
264264 public static <A > P1 <A > memo (F <Unit , A > f ) {
265- return P .lazy (f ).memo ();
265+ return P .lazy (f ).weakMemo ();
266266 }
267267
268268 public static <A > P1 <A > memo (F0 <A > f ) {
269- return P .lazy (f ).memo ();
269+ return P .lazy (f ).weakMemo ();
270270 }
271271
272272 static final class Memo <A > extends P1 <A > {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public final class P1Test {
1111
1212 @ Test
1313 public void bug105 () throws Exception {
14- final P1 <String > p1 = P .p ("Foo" ).memo ();
14+ final P1 <String > p1 = P .p ("Foo" ).weakMemo ();
1515 final AtomicInteger nullCounter = new AtomicInteger ();
1616 ExecutorService executorService = Executors .newCachedThreadPool ();
1717
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public class MemoisationTest {
1919
2020 public Property test1 () {
2121 return property (arbInteger , a -> {
22- P1 <Integer > t = P .lazy (() -> a ).memo ();
22+ P1 <Integer > t = P .lazy (() -> a ).weakMemo ();
2323 return prop (t ._1 ().equals (t ._1 ())).and (prop (t ._1 ().equals (a )));
2424 });
2525 }
You can’t perform that action at this time.
0 commit comments