I have this java code that I am trying to port: `...
# getting-started
c
I have this java code that I am trying to port:
Copy code
private static final Map<String, Function<DeDup, Consumer<String>>> CMDS = new HashMap<>();

    static {
        CMDS.put("--root", d -> f -> Optional.of(f).map(File::new).filter(d.isChild.negate()).ifPresent(d.roots::add));
        CMDS.put("--type", d -> type -> d.fileTypes.add(type));
        CMDS.put("--hash", d -> hash -> d.hashAlgo = hash);
        CMDS.put("--help", d -> d::exitHelp);
    }
so far I have:
Copy code
val CMDS:Map<String, Function<DeDup,Consumer<String>> = mapOf("--root" to )
and I don't get it - a function only take one argument: an out param?