export function onEach(value: T[], action: (it: T) => void): T[] { for (const it of value) { action(it); } return value; }