static L joinStreaks(O filter, O joiner, L l) {
int start = 0;
new L out;
for (int i = 0; i < l(l); i++) {
if (!isTrue(callF(filter, l.get(i)))) {
if (i == start+1)
out.add(l.get(start));
else if (i > start)
out.add(callF(joiner, subList(l, start, i)));
start = i+1;
out.add(l.get(i));
}
}
if (start == l(l)-1)
out.add(l.get(start));
else if (l(l) > start)
out.add(callF(joiner, subList(l, start)));
ret out;
}