static O[] mapToArrayOrNull(A[] l, IF1 f) {
if (l == null) null;
int n = l.length;
if (n == 0) null;
O[] array = new[n];
for i to n:
array[i] = f.get(l[i]);
ret array;
}
static O[] lambdaMapLike mapToArrayOrNull(IF1 f, A[] l) {
ret mapToArrayOrNull(l, f);
}
static O[] mapToArrayOrNull(IF1 f, Cl l) {
int n = l(l);
if (n == 0) null;
O[] array = new[n];
if (n != 0) {
Iterator it = iterator(l);
for i to n:
array[i] = callF(f, it.next());
}
ret array;
}
static O[] mapToArrayOrNull(Cl l, IF1 f) {
ret mapToArrayOrNull(l, f);
}