Functional programming really shines when iterating over collections. Compare
val list = readLines("myfile.csv").drop(1).map(MyObj::fromCSV);
to read a CSV file into a list of objects, instead of
List<String> lines = readLines("myfile.csv");
List<MyObj> list = new ArrayList<>();
for(int i = 1; i < lines.size(); i++) {
list.add(MyObj.fromCSV(line));
}
The imperative version requires a lot of low-level constructs to achieve the same thing, while the functional alternative just re-combines the same few, well-known operations over and over (drop, filter, map, reduce, etc), with lambdas for custom behavior.