Warning: session_start(): open(/var/lib/php/sessions/sess_0bhespac6oj2r8m474cmavdrol, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// f : A -> Collection
static Set mapLike transitiveHullOfFunction(O f, A input, O... _) {
final HashSet seen = lithashset(input);
final Int max = cast optPar max(_);
// Make pool of iterators
final new LinkedList> pool;
pool.add(iterator((Iterable) callF(f, input)));
int n = 0;
while ping (!empty(pool) && (max == null || n < max)) {
Iterator it = first(pool);
if (!it.hasNext()) continue with removeFirst(pool);
// Get entry and check if seen already
A entry = it.next();
if (!seen.add(entry)) continue;
// found new entry - return and schedule for further analysis
Collection newStuff = cast callF(f, entry);
if (nempty(newStuff))
pool.add(iterator(newStuff));
++n;
}
ret seen;
}