From a0d8c8066faadaf609e151ed0b71235a9615584a Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Mon, 1 Jun 2015 12:49:53 +1000 Subject: Rename fmap -> map (apparently that's what Java's going with, see java.util.Optional) --- src/main/java/au/id/zancanaro/javacheck/Generator.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java/au/id/zancanaro/javacheck/Generator.java') diff --git a/src/main/java/au/id/zancanaro/javacheck/Generator.java b/src/main/java/au/id/zancanaro/javacheck/Generator.java index 55d06f8..076f7c2 100644 --- a/src/main/java/au/id/zancanaro/javacheck/Generator.java +++ b/src/main/java/au/id/zancanaro/javacheck/Generator.java @@ -1,6 +1,5 @@ package au.id.zancanaro.javacheck; -import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.function.Function; @@ -36,13 +35,13 @@ public interface Generator { }; } - default Generator fmap(Function f) { - return (random, size) -> this.generate(random, size).fmap(f); + default Generator map(Function f) { + return (random, size) -> this.generate(random, size).map(f); } default Generator flatMap(Function> action) { return (random, size) -> { - return RoseTree.join(this.generate(random, size).fmap(action).fmap(g -> g.generate(random, size))); + return RoseTree.join(this.generate(random, size).map(action).map(g -> g.generate(random, size))); }; } } -- cgit v1.2.3