Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type mytype = Trip.trip list;;
- let read_lines name : Trip.trip list =
- let ic = open_in name in
- let try_read () =
- try Some (matcher (read_line ())) with End_of_file -> None in
- let rec loop acc = match try_read () with
- | Some s -> loop (s :: acc)
- | None -> close_in ic; List.rev acc in
- loop []
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement