• coloredgrayscale
    arrow-up
    2
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    A naive iterative implementation would be by adding and removing the folders/files from a list.

    If tail call optimization works on the (recursive) example then that’s (kinda) the compiler turning a recursive function into a loop.