3 ms·
It depends. As we know, FP is all about not having side effects. Having “for” loop requires to mutate the pointer of given iteration.
by rydel 8y 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.
- pjmlp 8y agoOh, 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.