Skip to content

Instantly share code, notes, and snippets.

@ktoso
Last active August 29, 2015 14:07
Show Gist options
  • Save ktoso/9115f2dca0fd6f9f44d1 to your computer and use it in GitHub Desktop.
Save ktoso/9115f2dca0fd6f9f44d1 to your computer and use it in GitHub Desktop.
FoldDrain<String, String> fold = new FoldDrain<String, String>();
Future<String> got = materialized.getDrainFor(fold);
}
}
class FoldDrain<In, Res> extends DrainWithTheKey<In, Future<Res>> { }
class DrainWithTheKey<In, Res> {
public Res something() { return null; }
}
class Materialized {
public <T> T getDrainFor(DrainWithTheKey<?, T> drainKey) { return null; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment