static L substrings(S s, L ranges) { new L out; for (IntRange range : ranges) out.add(substring(s, range)); ret out; }