• Faresh@lemmy.ml
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    1 year ago

    I think this is pretty much the imperative equivalent of foldl (\acc i -> acc + 3*i) 0 [1..4].