I have a problem with ocaml, i'm a beginner in ocaml. I want to use #load "....ml" . Then open "....ml" .
When I'm using emacs it's ok but I currently using linux xfce with ocaml compiler and when I try to use #load and open, I have a syntax error.
I have already look on the web, if I didn't need to use '#' before load but I have also a syntax error.
Example of my code which work with Emacs :
#load "list_ap1.cmo"
open List_ap1;;
And there is what is it in liste_ap1.cmo
module List_ap1 =
struct
let len(l) = List.length l;;
let fst(l) =
match l with
[] -> failwith "error empty list"
| hd::tail -> hd
;;
Can anyone help me ? Have a nice day