Skip to content

Instantly share code, notes, and snippets.

@io7m
Created November 25, 2016 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save io7m/f97226a950c17470ea0ca7f7c08d647f to your computer and use it in GitHub Desktop.
Save io7m/f97226a950c17470ea0ca7f7c08d647f to your computer and use it in GitHub Desktop.
sortedMapOf
private static <K, V> SortedMap<K, V> sortedMapOf(
final Value<V> seq,
final Function<V, K> key)
{
return TreeMap.of(seq.map(v -> Tuple.of(key.apply(v), v)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment