Earlier quoted context omitted.
If your code is sufficiently terse that it's not very understandable (such that the complexity isn't very understandable) surely that's a realistic red flag?
My shipping boxes hold an even number of widgets, but I "have to" sell odd quantities and those need expensive mil spec styrofoam peanuts added to fill the hole. Here, have an array of possible shipment sizes. Given that array, if its shipping an odd number of widgets I wanna add an additional half widget shipping charge. newshipping = oldshipping.select{|i| i % 2 == 1 }.map{|i| i + 0.5 } My ridiculous fictional writ…
List newshipping = oldshipping.stream().filter(i -> i % 2 == 1).map(i -> i + 0.5d).collect(Collectors.toList());
a bit more verbose but the essential chaining idea is there...