News for hackers. Stuff that matters.
Re:OCamlScript – a JavaScript back end for OCaml by hongboz on Friday January 08, 2016 @01:48PM (#10867187)
List.fold_left is compiled into a while loop in ocamlscript. The main reason that I used for loop is that the generated code is the same as hand written js, so the comparison is more reasonable

Edit: I am a practical programmer, I am in favor of both for loop and recursion as long as it is readable

There are no comments on this comment yet.