1. Implement the permutations() method for LinkedList.
2. Modify the hashCode() method so that it does not use Integers (instead only raw ints) to avoid silly allocations.
3. Use foldl() instead of foldr() in places where it does not matter which since the first is more efficient.
4. Use method references instead of introducing lambdas in places where it is possible.
5 Some refactorings.