What is the OCaml idiom equivalent to Python’s range function?
There is no idiom that I know of, but here is a fairly natural definition using an infix operator: # let (–) i j = let rec aux n acc = if n < i then acc else aux (n-1) (n :: acc) in aux j [] ;; val ( — ) : int -> … Read more