/** * @tsplus static List.Aspects forEach * @tsplus pipeable List forEach */ export function forEach(f: (a: A) => U) { return (self: List): void => { let these = self while (!these.isNil()) { f(these.head) these = these.tail } } }