Hacker News new | ask | show | jobs
by rydel 2782 days ago
It depends. As we know, FP is all about not having side effects. Having “for” loop requires to mutate the pointer of given iteration.
1 comments

Oh, and I thought all these years that OCaml was a FP language, go figure!

    open Printf;;

    printf "After all OCaml isn't a FP language\n";
    for idx = 1 to 10 do
        printf "%d\n" idx
    done
Same goes to Common Lisp, F#, Scala, Clojure.