Add higher-order functions: adapt (for array), generate, filter, exists, all.