TIterable = Object clone() do (

    #requires(__getitem__, __len__)

    foreach = method(f,
        i = 0
        N = self __len__() - 1
        c = Continuation current()
        f(self __getitem__(i))
        (i < N) ifTrue(i += 1; c())
        None
    )
)

List uses(TIterable)
