Building OCaml code that uses list comprehension
问题 From this SO question: List Comprehension in Ocaml?, I could install the comprehension package with opam install pa_comprehension , and use the package in toplevel REPL. # #require "pa_comprehension";; # open Batteries;; # [? 2 * x | x <- 0 -- max_int ; x * x > 3 ?];; - : int Batteries.Enum.t = <abstr> Then, how can I compile the code? 回答1: Unfortunately, since pa_comprehension package name is not ended with .syntax extension, this is a little bit harder than it should be. (The fact that this