As I'm learning how to use various new tools, I ran upon this syntax (Function x -> ...) which I'm having trouble understanding, and I'd love for someone to write equivalent code if possible so that I can understand it better.
Function<String, HashSet<String>> asSet = (String x) ->
new HashSet<String>() {{
do_something(x);
}};
Any block of code using more traditional syntax and not that weird Function would be greatly appreciated and useful in helping me better my understanding of Java!